Commit 9f20a9e5 by ludi

修复一些bug

parent 350a8af8
......@@ -13,6 +13,13 @@
// 设置网络图片
- (void)setWebImageWithSubURLString:(NSString *)urlString placeholder:(UIImage *)placeholder;
/// 设置网络图片
/// - Parameters:
/// - urlString: url
/// - placeholder: 占位图
/// - scale: 强制几x图:1-3
- (void)setWebImageWithSubURLString:(NSString *)urlString placeholder:(UIImage *)placeholder scale:(NSInteger)scale;
- (void)setWebImageWithSubURLString:(NSString *)urlString controlState:(UIControlState)state placeholder:(UIImage *)placeholder;
- (void)setWebBackgroundImageWithSubURLString:(NSString *)urlString;
......
......@@ -37,6 +37,33 @@
[self setImageWithURL:url forState:UIControlStateNormal placeholder:placeholder];
}
- (void)setWebImageWithSubURLString:(NSString *)urlString placeholder:(UIImage *)placeholder scale:(NSInteger)scale
{
if ([urlString containsString:@"boy"] || [urlString containsString:@"girl"]) {
[self setImage:UIImage.fus_defaultIcon forState:UIControlStateNormal];
return;
}
//链接以LocalimageUrl开头的默认为本地图片
if ([urlString hasPrefix:@"LocalimageUrl"]) {
[self setImage:[UIImage imageNamed:urlString] forState:UIControlStateNormal];
return;
}
NSURL *url = nil;
if ([urlString containsString:@"http"]) {
url = [NSURL URLWithString:urlString];
}else{
url = [NSURL URLWithString:[FUSConfig.sharedInstanced.pathConfigs downloadPath:urlString]];
}
[self setImageWithURL:url forState:UIControlStateNormal placeholder:placeholder options:kNilOptions completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) {
if (image) {
[self setImage:[UIImage imageWithCGImage:image.CGImage scale:scale orientation:UIImageOrientationUp] forState:UIControlStateNormal];
}
}];
}
- (void)setWebImageWithSubURLString:(NSString *)urlString controlState:(UIControlState)state placeholder:(UIImage *)placeholder
{
if ([urlString containsString:@"boy"] || [urlString containsString:@"girl"]) {
......
......@@ -5,31 +5,18 @@
"scale" : "1x"
},
{
"resizing" : {
"mode" : "9-part",
"center" : {
"mode" : "stretch",
"width" : 1,
"height" : 1
},
"cap-insets" : {
"bottom" : 15,
"top" : 27,
"right" : 52,
"left" : 15
}
},
"idiom" : "universal",
"filename" : "zone_pop_tip_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "zone_pop_tip_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -181,6 +181,16 @@
}
[self.photoCollectionView reloadData];
// ludy:适配ios15以上导航栏会无缘无故变色问题
if (@available(iOS 15.0, *)) {
UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init];
[appearance configureWithOpaqueBackground];
appearance.backgroundColor = [UIColor fus_appBGColor];
// appearance.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor fus_textColorRich], NSFontAttributeName: [UIFont fus_themeFont:13]};
self.navigationController.navigationBar.standardAppearance = appearance;
self.navigationController.navigationBar.scrollEdgeAppearance = appearance;
}
}
- (void)viewDidAppear:(BOOL)animated
......
......@@ -203,6 +203,18 @@
*/
- (void)initNav
{
if (@available(iOS 15.0, *)) {
UINavigationBarAppearance *navigationBarAppearance = [[UINavigationBarAppearance alloc] init];
[navigationBarAppearance configureWithTransparentBackground];
navigationBarAppearance.backgroundEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];;
self.navigationController.navigationBar.standardAppearance = navigationBarAppearance;
self.navigationController.navigationBar.scrollEdgeAppearance = self.navigationController.navigationBar.standardAppearance;
// 设置NavigationBar的磨砂效果
self.navigationController.navigationBar.translucent = YES;
}
CGFloat lineWidth = 1.0;
FUSChoseButton *backBtn = [FUSChoseButton buttonWithType:UIButtonTypeCustom];
......
......@@ -342,7 +342,7 @@
FUSContryModel *model = countries[indexPath.row];
if ([model.country_code isEqualToString:self.currentSelectedCode]) {
cell.addressLb.textColor = [UIColor fus_themeColor];
cell.addressLb.textColor = [UIColor fus_diamondBlue];
}else {
cell.addressLb.textColor = [UIColor fus_textColorRich];
}
......
......@@ -52,12 +52,14 @@
self.network1Btn.style = FUSButtonStyleBlue;
[self.network1Btn setTitle:[NSString fus_localString:@"网络1"] forState:UIControlStateNormal];
[self.network1Btn setImage:[UIImage imageNamed:@"setting_network"] forState:UIControlStateNormal];
self.network1Btn.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 0, 0);
self.network1Btn.titleEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
self.network1Btn.imageEdgeInsets = UIEdgeInsetsMake(0, -10, 0, 0);
self.network2Btn.style = FUSButtonStyleBlue;
[self.network2Btn setTitle:[NSString fus_localString:@"网络2"] forState:UIControlStateNormal];
self.network2Btn.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 0, 0);
self.network2Btn.titleEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
[self.network2Btn setImage:[UIImage imageNamed:@"setting_network"] forState:UIControlStateNormal];
self.network2Btn.imageEdgeInsets = UIEdgeInsetsMake(0, -10, 0, 0);
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapToClose)];
[self addGestureRecognizer:tap];
......
......@@ -15,10 +15,10 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Z5I-HG-ezk">
<rect key="frame" x="72" y="296" width="270" height="304"/>
<rect key="frame" x="97" y="348" width="220" height="200"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="eyX-32-zec">
<rect key="frame" x="-10" y="-10" width="290" height="324"/>
<rect key="frame" x="-10" y="-10" width="240" height="220"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
......@@ -27,13 +27,13 @@
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请依次检测以下网路" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="apb-FP-yNY">
<rect key="frame" x="20" y="50" width="230" height="21"/>
<rect key="frame" x="20" y="25" width="180" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vb9-x5-MO8" customClass="FUSStyleButton">
<rect key="frame" x="60" y="124" width="150" height="40"/>
<rect key="frame" x="35" y="75" width="150" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="150" id="ltp-za-xxh"/>
<constraint firstAttribute="height" constant="40" id="tUj-Pl-cGI"/>
......@@ -45,7 +45,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FHb-AM-C99" customClass="FUSStyleButton">
<rect key="frame" x="60" y="206" width="150" height="40"/>
<rect key="frame" x="35" y="135" width="150" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="TV2-UZ-1a7"/>
<constraint firstAttribute="width" constant="150" id="tjZ-Az-UUw"/>
......@@ -60,18 +60,18 @@
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="eyX-32-zec" secondAttribute="bottom" constant="-10" id="0SX-6D-qwB"/>
<constraint firstItem="FHb-AM-C99" firstAttribute="top" secondItem="vb9-x5-MO8" secondAttribute="bottom" constant="42" id="DPF-3c-Mhf"/>
<constraint firstItem="FHb-AM-C99" firstAttribute="top" secondItem="vb9-x5-MO8" secondAttribute="bottom" constant="20" id="DPF-3c-Mhf"/>
<constraint firstItem="apb-FP-yNY" firstAttribute="leading" secondItem="Z5I-HG-ezk" secondAttribute="leading" constant="20" id="GU9-MA-yc6"/>
<constraint firstAttribute="trailing" secondItem="eyX-32-zec" secondAttribute="trailing" constant="-10" id="Ijn-5z-aUe"/>
<constraint firstAttribute="width" constant="270" id="Mjq-Sn-fFz"/>
<constraint firstAttribute="width" constant="220" id="Mjq-Sn-fFz"/>
<constraint firstItem="FHb-AM-C99" firstAttribute="centerX" secondItem="Z5I-HG-ezk" secondAttribute="centerX" id="Nky-4K-1L1"/>
<constraint firstItem="eyX-32-zec" firstAttribute="top" secondItem="Z5I-HG-ezk" secondAttribute="top" constant="-10" id="Wo6-gz-cXJ"/>
<constraint firstAttribute="trailing" secondItem="apb-FP-yNY" secondAttribute="trailing" constant="20" id="drP-Bc-WUc"/>
<constraint firstItem="vb9-x5-MO8" firstAttribute="centerX" secondItem="Z5I-HG-ezk" secondAttribute="centerX" id="jAx-CW-eVf"/>
<constraint firstItem="vb9-x5-MO8" firstAttribute="top" secondItem="Z5I-HG-ezk" secondAttribute="top" constant="124" id="jp6-XY-p3X"/>
<constraint firstItem="vb9-x5-MO8" firstAttribute="top" secondItem="Z5I-HG-ezk" secondAttribute="top" constant="75" id="jp6-XY-p3X"/>
<constraint firstItem="eyX-32-zec" firstAttribute="leading" secondItem="Z5I-HG-ezk" secondAttribute="leading" constant="-10" id="lSU-wg-iLz"/>
<constraint firstItem="apb-FP-yNY" firstAttribute="top" secondItem="Z5I-HG-ezk" secondAttribute="top" constant="50" id="nk4-V2-HrJ"/>
<constraint firstAttribute="height" constant="304" id="vZS-Cu-IkS"/>
<constraint firstItem="apb-FP-yNY" firstAttribute="top" secondItem="Z5I-HG-ezk" secondAttribute="top" constant="25" id="nk4-V2-HrJ"/>
<constraint firstAttribute="height" constant="200" id="vZS-Cu-IkS"/>
</constraints>
</view>
</subviews>
......
......@@ -203,7 +203,6 @@
//titleView
_segCtrlView = [[FUSSegmentControlView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW*0.5, 38) withItems:_itemNames];
[_segCtrlView fus_setUnderLineSelectedImage:[UIImage imageNamed:@"common_icon_segment_selected"]];
_segCtrlView.itemSelectedFont = [UIFont fus_themeBoldFont:21];
[_segCtrlView fus_setItemTitleColor:[UIColor fus_textColorLight] forState:UIControlStateNormal];
[_segCtrlView fus_setItemTitleColor:[UIColor fus_textColorRich] forState:UIControlStateSelected];
......@@ -212,6 +211,7 @@
_segCtrlView.underLine.backgroundColor = [UIColor clearColor];
_segCtrlView.itemSelectedFont = [UIFont fus_themeBoldFont:17];
}else {
[_segCtrlView fus_setUnderLineSelectedImage:[UIImage imageNamed:@"common_icon_segment_selected"]];
_segCtrlView.isShowUnderLine = YES;
_segCtrlView.underLine.backgroundColor = [UIColor fus_textColorRich];
}
......
......@@ -7,11 +7,14 @@
//
#import "FUSZhaiXinModel.h"
#import "FUSZhaiXinDBOperate.h"
@implementation FUSZhaiXinModel
- (NSString *)content {
if ([self.type isEqualToString:@"OfficialMessage"]) {
if ([self.type isEqualToString:OFFICIAL_MESSAGE] ||
[self.typeId hasPrefix:OFFICIAL_MESSAGE] ||
[self.typeId hasPrefix:NOTIFICATION_MESSAGE]) {
_content = [_content fus_adaptFusiString];
}
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
......@@ -15,13 +13,13 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qZb-ac-d5a">
<rect key="frame" x="118" y="11.5" width="84" height="21"/>
<rect key="frame" x="111" y="10" width="98" height="24"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="9"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<inset key="contentEdgeInsets" minX="10" minY="5" maxX="10" maxY="5"/>
<state key="normal" title="4月03日 15:44">
<color key="titleColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......
......@@ -24,6 +24,7 @@
self.rankLabel.textColor = [UIColor fus_textColorRich];
self.nickNameLabel.textColor = [UIColor fus_textColorRich];
self.richCountLabel.textColor = [UIColor fus_fireGreen];
self.backgroundColor = UIColor.fus_appBGColor;
self.selectedBackgroundView = [[UIView alloc] init];
......
......@@ -110,6 +110,7 @@
- (void)customInit {
self.tipLabel.text = [NSString fus_localString:@"发帖文"];
self.tipLabel.textColor = [UIColor fus_textColorRich];
self.tipBGImageView.image = [UIImage imageNamed:[FUSRTL RTLImageName:@"zone_pop_tip_bg"]];
}
......
......@@ -705,7 +705,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
FUSWebActionModel *model = [FUSWebActionModel fus_modelWithDict:action];
if (model) {
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setWebImageWithSubURLString:model.imgUrl placeholder:nil];
[btn setWebImageWithSubURLString:model.imgUrl placeholder:nil scale:2];
btn.imageView.contentMode = UIViewContentModeScaleAspectFit;
btn.frame = CGRectMake(lastX, y, btnSize, btnSize);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
......
......@@ -2195,3 +2195,5 @@
"私房信用" = "私房信用";
"点赞将消耗%@,是否继续点赞" = "點讚將消耗%@,是否繼續點讚";
"人气榜" = "人氣榜";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment