Commit dfcf1a93 by ludi

修复一系列bug

parent b427d222
Showing with 128 additions and 36 deletions
...@@ -369,6 +369,7 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调 ...@@ -369,6 +369,7 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调
// 检测包的完整性 // 检测包的完整性
if (![mSocketQueue fus_checkDataAvailable]) { if (![mSocketQueue fus_checkDataAvailable]) {
FUSLogInfo(@"--->socket完整性欠缺:socketAcceptMessageWithData\n");
[self fus_socketReconnectWithBlock:^(BOOL isSuccess) { [self fus_socketReconnectWithBlock:^(BOOL isSuccess) {
}]; }];
...@@ -391,13 +392,13 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调 ...@@ -391,13 +392,13 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调
/// 并且showAppBinary大于等于2位(因为fusi是第二位的布尔值表示,且这个数值是从右往左读的,所以要取倒数第二位的数值) /// 并且showAppBinary大于等于2位(因为fusi是第二位的布尔值表示,且这个数值是从右往左读的,所以要取倒数第二位的数值)
/// 并且showAppBinary的第二位是1 /// 并且showAppBinary的第二位是1
/// 则这个socket在fusi中不处理 /// 则这个socket在fusi中不处理
if ([FUSConfig sharedInstanced].devConfigs.enableSocketDebug && messageModel.cid) FUSLogInfo(@"--->收到过滤消息:\n showAppBinary = %@", showAppBinary); if ([FUSConfig sharedInstanced].devConfigs.enableSocketDebug /*&& messageModel.cid*/) FUSLogInfo(@"--->收到过滤消息:\n showAppBinary = %@", showAppBinary);
return; return;
} }
} }
} }
// 打印收到的消息 // 打印收到的消息
if ([FUSConfig sharedInstanced].devConfigs.enableSocketDebug && messageModel.cid) FUSLogInfo(@"--->收到消息:\n%@", [messageModel fus_getDictionary]); if ([FUSConfig sharedInstanced].devConfigs.enableSocketDebug /*&& messageModel.cid*/) FUSLogInfo(@"--->收到消息:\n%@", [messageModel fus_getDictionary]);
// 判断消息是否为空 // 判断消息是否为空
if ([NSObject isNullWithObject:messageModel]) { if ([NSObject isNullWithObject:messageModel]) {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#import "FUSPublicLiveGiftSendView.h" #import "FUSPublicLiveGiftSendView.h"
#import "FUSPublicVideoChatUserInfoView.h" #import "FUSPublicVideoChatUserInfoView.h"
#import "FUSPublicLiveBeautyParameterView.h" #import "FUSPublicLiveBeautyParameterView.h"
#import "FUSSocialShareManager.h"
#define FUSLiveModule BFModule(FUSLiveRouterProtocol) #define FUSLiveModule BFModule(FUSLiveRouterProtocol)
...@@ -115,6 +116,13 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -115,6 +116,13 @@ NS_ASSUME_NONNULL_BEGIN
/// 发送弹幕 /// 发送弹幕
-(void)fus_showInputWithSendBarrage:(NSInteger)barrageId; -(void)fus_showInputWithSendBarrage:(NSInteger)barrageId;
/// 显示分享页面
/// - Parameters:
/// - showOnView: 显示在哪
/// - shareHandler: 回调
-(void)fus_showShareViewWithShowOn:(UIView *)showOnView
shareHandler:(void(^)(SocialSharePlatform type))shareHandler;
@end @end
/// 直播间礼物面板的分页类型,区分打开背包后默认跳转到哪一个分页 /// 直播间礼物面板的分页类型,区分打开背包后默认跳转到哪一个分页
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSChatCenterBundle.xcscheme_^#shared#^_</key> <key>FUSChatCenterBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>72</integer> <integer>74</integer>
</dict> </dict>
<key>FUSChatCenterModule.xcscheme_^#shared#^_</key> <key>FUSChatCenterModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>73</integer> <integer>77</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -68,8 +68,18 @@ import SJAttributesStringMaker ...@@ -68,8 +68,18 @@ import SJAttributesStringMaker
/// 是否够下次通话付款 1:是 0:否 /// 是否够下次通话付款 1:是 0:否
let diamondAgainPay = BehaviorRelay<Int>(value: 1) let diamondAgainPay = BehaviorRelay<Int>(value: 1)
/// OC 是否够下次通话付款 1:是 0:否
@objc public var oc_diamondAgainPay: Int{
get{ diamondAgainPay.value }
set{ diamondAgainPay.accept(newValue) }
}
/// 提示充钱之前有没有送过礼 /// 提示充钱之前有没有送过礼
let sendGiftDuringAgainPay = BehaviorRelay<Bool>(value: false) let sendGiftDuringAgainPay = BehaviorRelay<Bool>(value: false)
/// OC 提示充钱之前有没有送过礼
@objc public var oc_sendGiftDuringAgainPay: Bool{
get{ sendGiftDuringAgainPay.value }
set{ sendGiftDuringAgainPay.accept(newValue) }
}
// 收到礼物本地计数 // 收到礼物本地计数
var receiveGiftCount = 0 var receiveGiftCount = 0
...@@ -563,8 +573,9 @@ import SJAttributesStringMaker ...@@ -563,8 +573,9 @@ import SJAttributesStringMaker
func fus_callConnectSuccesReport(callId: String){ func fus_callConnectSuccesReport(callId: String){
FUSIMChatHttpHelper.fus_requestOneToOneCallConnectSuccess(with: callId) { FUSIMChatHttpHelper.fus_requestOneToOneCallConnectSuccess(with: callId) {
} failure: { msg, code in } failure: {[weak self] msg, code in
FUSDialogView.fus_showDialog(msg) FUSDialogView.fus_showDialog(msg)
self?.endCall(reason: .requestConnectSuccessFail)
} }
} }
......
...@@ -3444,6 +3444,10 @@ ...@@ -3444,6 +3444,10 @@
// 更新用户的宝石 // 更新用户的宝石
[[FUSCacheDataShare shareStore].userDetailInfo fus_setValueWithDict:dataDict[@"cv"][@"changed"]]; [[FUSCacheDataShare shareStore].userDetailInfo fus_setValueWithDict:dataDict[@"cv"][@"changed"]];
// 控制送礼是否显示通话剩余不足一分钟提示
[FUSChatCallHelper shared].oc_sendGiftDuringAgainPay = YES;
[FUSChatCallHelper shared].oc_diamondAgainPay = [dataDict[@"checkPay"] integerValue];
// 透传消息需要的参数 // 透传消息需要的参数
_callGiftGid = giftID; _callGiftGid = giftID;
_callGiftRichLevel = [FUSCacheDataShare shareStore].userDetailInfo.level; _callGiftRichLevel = [FUSCacheDataShare shareStore].userDetailInfo.level;
......
...@@ -274,6 +274,7 @@ class FUSCallEndCallDetailAlertView: FUSBaseView { ...@@ -274,6 +274,7 @@ class FUSCallEndCallDetailAlertView: FUSBaseView {
make.image = .fus_diamonIcon() make.image = .fus_diamonIcon()
make.alignment = .center make.alignment = .center
} }
make.append(" ")
make.append("\(incomeModel.timeGemNum)").textColor(.fus_diamondBlue()) make.append("\(incomeModel.timeGemNum)").textColor(.fus_diamondBlue())
}else { }else {
make.append(.fus_versionLocalString("免费")).textColor(.white) make.append(.fus_versionLocalString("免费")).textColor(.white)
...@@ -286,6 +287,7 @@ class FUSCallEndCallDetailAlertView: FUSBaseView { ...@@ -286,6 +287,7 @@ class FUSCallEndCallDetailAlertView: FUSBaseView {
make.image = incomeModel.timeIncome.fus_getCurrencyIcon() make.image = incomeModel.timeIncome.fus_getCurrencyIcon()
make.alignment = .center make.alignment = .center
} }
make.append(" ")
make.append("\(incomeModel.timeIncome.total)").textColor(incomeModel.timeIncome.fus_getCurrencyTextColor()) make.append("\(incomeModel.timeIncome.total)").textColor(incomeModel.timeIncome.fus_getCurrencyTextColor())
}else { }else {
make.append(.fus_versionLocalString("免费")).textColor(.white) make.append(.fus_versionLocalString("免费")).textColor(.white)
...@@ -303,12 +305,14 @@ class FUSCallEndCallDetailAlertView: FUSBaseView { ...@@ -303,12 +305,14 @@ class FUSCallEndCallDetailAlertView: FUSBaseView {
make.image = .fus_diamonIcon() make.image = .fus_diamonIcon()
make.alignment = .center make.alignment = .center
} }
make.append(" ")
make.append("\(incomeModel.giftGemNum)").textColor(.fus_diamondBlue()) make.append("\(incomeModel.giftGemNum)").textColor(.fus_diamondBlue())
}else { }else {
make.append { make in make.append { make in
make.image = .fus_fireIcon() make.image = .fus_fireIcon()
make.alignment = .center make.alignment = .center
} }
make.append(" ")
make.append("\(incomeModel.giftIncome)").textColor(.fus_fireGreen()) make.append("\(incomeModel.giftIncome)").textColor(.fus_fireGreen())
} }
make.font(.fus_themeMediumFont(17)) make.font(.fus_themeMediumFont(17))
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSShowRoomBundle.xcscheme_^#shared#^_</key> <key>FUSShowRoomBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>74</integer> <integer>75</integer>
</dict> </dict>
<key>FUSShowRoomModule.xcscheme_^#shared#^_</key> <key>FUSShowRoomModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>76</integer> <integer>72</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
self.segmentView = [[FUSSegmentControlView alloc] initWithFrame:CGRectMake(5, 0, self.topView.width - 5, self.topView.height)]; self.segmentView = [[FUSSegmentControlView alloc] initWithFrame:CGRectMake(5, 0, self.topView.width - 5, self.topView.height)];
self.segmentView.alignment = FUSSegmentControlAlignmentLeft; self.segmentView.alignment = FUSSegmentControlAlignmentLeft;
self.segmentView.segmentDelegate = self; self.segmentView.segmentDelegate = self;
self.segmentView.isShowSelectedBgImgView = YES; // self.segmentView.isShowSelectedBgImgView = YES;
self.segmentView.isShowUnderLine = YES; self.segmentView.isShowUnderLine = YES;
[self.segmentView fus_setUnderLineSelectedImage:UIImage.fus_segmentSelectedDot]; [self.segmentView fus_setUnderLineSelectedImage:UIImage.fus_segmentSelectedDot];
self.segmentView.itemFont = [UIFont fus_themeFont:13]; self.segmentView.itemFont = [UIFont fus_themeFont:13];
...@@ -1011,8 +1011,8 @@ ...@@ -1011,8 +1011,8 @@
NSRange hotnumRange = [thirdStr rangeOfString:parcelModel.hotnum]; NSRange hotnumRange = [thirdStr rangeOfString:parcelModel.hotnum];
NSMutableAttributedString *attributedStr = [[NSMutableAttributedString alloc] initWithString:thirdStr]; NSMutableAttributedString *attributedStr = [[NSMutableAttributedString alloc] initWithString:thirdStr];
[attributedStr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHex:@"#808080"] range:NSMakeRange(0, thirdStr.length)]; [attributedStr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHex:@"#808080"] range:NSMakeRange(0, thirdStr.length)];
[attributedStr setAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"58DBD7"]} range:bondsRange]; [attributedStr setAttributes:@{NSForegroundColorAttributeName:[UIColor fus_fireGreen]} range:bondsRange];
[attributedStr setAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"58DBD7"]} range:hotnumRange]; [attributedStr setAttributes:@{NSForegroundColorAttributeName:[UIColor fus_fireGreen]} range:hotnumRange];
return attributedStr; return attributedStr;
} else { } else {
return [[NSMutableAttributedString alloc] init]; return [[NSMutableAttributedString alloc] init];
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#import "FUSHomePageViewController.h" #import "FUSHomePageViewController.h"
#import <FUSCommon/FUSCommon-Swift.h> #import <FUSCommon/FUSCommon-Swift.h>
#import <FUSShowRoomModule/FUSShowRoomModule-Swift.h>
@implementation FUSShowRoomRouter @implementation FUSShowRoomRouter
...@@ -408,6 +409,9 @@ ...@@ -408,6 +409,9 @@
}]; }];
} }
- (void)fus_showShareViewWithShowOn:(UIView *)showOnView shareHandler:(void (^)(SocialSharePlatform))shareHandler{
[FUSShareToolSheetView fus_showShareViewWithShowOn:showOnView shareHandler:shareHandler];
}
#pragma mark - HTTP #pragma mark - HTTP
/** /**
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSUserCenterModule.xcscheme_^#shared#^_</key> <key>FUSUserCenterModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>77</integer> <integer>76</integer>
</dict> </dict>
<key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key> <key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>75</integer> <integer>73</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -183,6 +183,11 @@ ...@@ -183,6 +183,11 @@
_passwordTextFieldOne.shouldPaste = NO; _passwordTextFieldOne.shouldPaste = NO;
_passwordTextFieldTwo.shouldPaste = NO; _passwordTextFieldTwo.shouldPaste = NO;
_phoneTextField.clearButtonColor = [UIColor fus_textColorMedium];
_verifyTextField.clearButtonColor = [UIColor fus_textColorMedium];
_passwordTextFieldOne.clearButtonColor = [UIColor fus_textColorMedium];
_passwordTextFieldTwo.clearButtonColor = [UIColor fus_textColorMedium];
// 显示传过来的电话号码 // 显示传过来的电话号码
if (![NSString isNull:_phone]) { if (![NSString isNull:_phone]) {
_phoneTextField.text = self.phone; _phoneTextField.text = self.phone;
......
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
// 设置文本框长度 // 设置文本框长度
_phoneTextField.textMaxLength = 13; _phoneTextField.textMaxLength = 13;
_phoneTextField.inputType = FUSInputTypeNumber; _phoneTextField.inputType = FUSInputTypeNumber;
_phoneTextField.clearButtonColor = [UIColor fus_textColorMedium];
_phoneTextField.fus_delegate = self; _phoneTextField.fus_delegate = self;
_phoneTextField.delegate = self; _phoneTextField.delegate = self;
......
...@@ -138,6 +138,8 @@ ...@@ -138,6 +138,8 @@
[_phoneTextField addTarget:self action:@selector(textFieldDidBeginEditing:) forControlEvents:UIControlEventEditingDidBegin]; [_phoneTextField addTarget:self action:@selector(textFieldDidBeginEditing:) forControlEvents:UIControlEventEditingDidBegin];
[_passwordTextField addTarget:self action:@selector(textFieldDidBeginEditing:) forControlEvents:UIControlEventValueChanged]; [_passwordTextField addTarget:self action:@selector(textFieldDidBeginEditing:) forControlEvents:UIControlEventValueChanged];
_phoneTextField.clearButtonColor = [UIColor fus_textColorMedium];
_passwordTextField.clearButtonColor = [UIColor fus_textColorMedium];
_areaCodeTextField.textMaxLength = 4; _areaCodeTextField.textMaxLength = 4;
_areaCodeTextField.displayOnly = YES; _areaCodeTextField.displayOnly = YES;
......
...@@ -263,6 +263,11 @@ ...@@ -263,6 +263,11 @@
_areaCodeTextField.textMaxLength = 4; _areaCodeTextField.textMaxLength = 4;
_areaCodeTextField.displayOnly = YES; _areaCodeTextField.displayOnly = YES;
_phoneTextField.clearButtonColor = [UIColor fus_textColorMedium];
_codeTextField.clearButtonColor = [UIColor fus_textColorMedium];
_passwordTextField.clearButtonColor = [UIColor fus_textColorMedium];
_registCodeTextField.clearButtonColor = [UIColor fus_textColorMedium];
// 设置文本框输入长度 // 设置文本框输入长度
_phoneTextField.textMaxLength = 13; _phoneTextField.textMaxLength = 13;
......
...@@ -779,25 +779,62 @@ ...@@ -779,25 +779,62 @@
- (void)fus_showToolViewWithDelete:(BOOL)need isSelf:(BOOL)isSelf commentId:(NSInteger)commentId success:(void (^)(void))success { - (void)fus_showToolViewWithDelete:(BOOL)need isSelf:(BOOL)isSelf commentId:(NSInteger)commentId success:(void (^)(void))success {
FUSNewsFeedDetailToolView *toolView = [[FUSNewsFeedDetailToolView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH)]; MJWeakSelf
[[UIApplication sharedApplication].keyWindow addSubview:toolView]; if (need) {
[toolView fus_showViewNeedToolBtn:need isSelf:isSelf showSetDateVideo:NO]; [FUSActionSheetView showAcionSheetWithCancelTitle:[NSString fus_versionLocalString:@"取消"] otherTitles:@[[NSString fus_versionLocalString:@"追踪"],[NSString fus_versionLocalString:@"分享"],isSelf ? [NSString fus_versionLocalString:@"删除"] : [NSString fus_versionLocalString:@"举报"]] clickBlock:^(NSInteger buttonIndex, NSString *buttonTitle) {
__weak typeof(self) weakSelf = self; switch (buttonIndex) {
toolView.onClickDeleteBlock = ^{ case 0:
if (commentId) { {
[weakSelf fus_deleteNewsFeedCommentWithTopicId:weakSelf.model.topicId.integerValue commentId:commentId success:success]; // 追踪
} else { if (isSelf) {
[weakSelf fus_deleteNewsFeedWithTopicId:weakSelf.model.topicId]; [FUSDialogView fus_showDialog:[NSString fus_versionLocalString:@"自己不能關注自己哦"]];
} }else {
}; [[FUSRouter liveRouter] fus_likeRoomWithRoomId:weakSelf.model.uid success:^{
[FUSDialogView fus_showDialog:[NSString fus_localString:@"追踪成功"]];
toolView.onClickShareBlock = ^(SocialSharePlatform platform) { } failure:^(NSString * _Nonnull msg, int code) {
[weakSelf fus_shareNewsFeedWithPlatform:platform]; [FUSDialogView fus_showDialog:msg];
}; }];
}
}
break;
case 1:
{
// 分享
[[FUSRouter liveRouter] fus_showShareViewWithShowOn:[UIWindow fus_keyWindow] shareHandler:^(SocialSharePlatform type) {
[weakSelf fus_shareNewsFeedWithPlatform:type];
}];
}
break;
case 2:
{
// 删除或者举报
if (isSelf) {
// 删除
if (commentId) {
[weakSelf fus_deleteNewsFeedCommentWithTopicId:weakSelf.model.topicId.integerValue commentId:commentId success:success];
} else {
[weakSelf fus_deleteNewsFeedWithTopicId:weakSelf.model.topicId];
}
}else{
// 举报
[weakSelf fus_showReportViewWithTopicId:weakSelf.model.topicId commentId:commentId];
}
}
break;
case 3:
// 取消
break;
default:
break;
}
}];
}else {
// 分享
[[FUSRouter liveRouter] fus_showShareViewWithShowOn:[UIWindow fus_keyWindow] shareHandler:^(SocialSharePlatform type) {
[weakSelf fus_shareNewsFeedWithPlatform:type];
}];
}
toolView.onClickReportBlock = ^{
[weakSelf fus_showReportViewWithTopicId:weakSelf.model.topicId commentId:commentId];
};
} }
- (void)fus_clickAuthItem { - (void)fus_clickAuthItem {
......
...@@ -66,7 +66,12 @@ ...@@ -66,7 +66,12 @@
[self.backBtn addTarget:self action:@selector(popViewController) forControlEvents:UIControlEventTouchUpInside]; [self.backBtn addTarget:self action:@selector(popViewController) forControlEvents:UIControlEventTouchUpInside];
[self fus_updateBottomTableView]; [self fus_updateBottomTableView];
// [self fus_updateVideoSetting]; // [self fus_updateVideoSetting];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(fus_applicationDidBecomeActiveNotification:)
name:UIApplicationDidBecomeActiveNotification
object:nil];
} }
- (void)viewWillAppear:(BOOL)animated { - (void)viewWillAppear:(BOOL)animated {
...@@ -104,13 +109,18 @@ ...@@ -104,13 +109,18 @@
MJWeakSelf MJWeakSelf
[FUSSettingHttpRequest fus_userManagerVoiceSignGetSuccess:^(FUSUserManagerVoiceSignModel *model) { [FUSSettingHttpRequest fus_userManagerVoiceSignGetSuccess:^(FUSUserManagerVoiceSignModel *model) {
weakSelf.voiceSignModel = model; weakSelf.voiceSignModel = model;
// weakSelf.headerView.voiceSignModel = model; // weakSelf.headerView.voiceSignModel = model;
[weakSelf.bottomTableView reloadData]; [weakSelf.bottomTableView reloadData];
} failure:^(NSString *msg, int code) { } failure:^(NSString *msg, int code) {
}]; }];
} }
#pragma mark - notification
-(void)fus_applicationDidBecomeActiveNotification:(NSNotification *)noti{
[self.bottomTableView reloadData];
}
#pragma mark - UITableViewDelegate && UITableViewDataSource #pragma mark - UITableViewDelegate && UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
......
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
[headerView addSubview:bellView]; [headerView addSubview:bellView];
UILabel *titleLabel = [[UILabel alloc] init]; UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.text = [NSString fus_localString:@"通知权限已关闭,无法接收通知"]; titleLabel.text = [NSString fus_versionLocalString:@"通知權限未開啓,您將無法收到訊息通知"];
titleLabel.font = [UIFont fus_themeFont:15]; titleLabel.font = [UIFont fus_themeFont:15];
titleLabel.textColor = [UIColor fus_textColorMedium]; titleLabel.textColor = [UIColor fus_textColorMedium];
titleLabel.numberOfLines = 0; titleLabel.numberOfLines = 0;
...@@ -392,7 +392,7 @@ ...@@ -392,7 +392,7 @@
[headerView addSubview:titleLabel]; [headerView addSubview:titleLabel];
UIButton *settingBtn = [UIButton buttonWithType:UIButtonTypeCustom]; UIButton *settingBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[settingBtn setTitle:[NSString stringWithFormat:@" %@ ",[NSString fus_localString:@"去开启"]] forState:UIControlStateNormal]; [settingBtn setTitle:[NSString stringWithFormat:@" %@ ",[NSString fus_versionLocalString:@"开启"]] forState:UIControlStateNormal];
settingBtn.titleLabel.font = [UIFont fus_themeFont:13]; settingBtn.titleLabel.font = [UIFont fus_themeFont:13];
[settingBtn setTitleColor:[UIColor fus_textColorRich] forState:UIControlStateNormal]; [settingBtn setTitleColor:[UIColor fus_textColorRich] forState:UIControlStateNormal];
settingBtn.backgroundColor = [UIColor fus_themeColor]; settingBtn.backgroundColor = [UIColor fus_themeColor];
......
...@@ -114,12 +114,12 @@ import UIKit ...@@ -114,12 +114,12 @@ import UIKit
titleLabel.font = isNormal ? .fus_themeFont(14) : .fus_themeFont(16) titleLabel.font = isNormal ? .fus_themeFont(14) : .fus_themeFont(16)
titleLabel.textColor = .fus_textColorRich() titleLabel.textColor = .fus_textColorRich()
titleLabel.text = isNormal ? .fus_versionLocalString("开启通知权限,您可以第一时间收到") : .fus_versionLocalString("开启通知权限") titleLabel.text = isNormal ? .fus_versionLocalString("開啓通知,您將第一時間收到重要訊息") : .fus_versionLocalString("开启通知权限")
titleLabel.textAlignment = isNormal ? .left : .center titleLabel.textAlignment = isNormal ? .left : .center
contentView.addSubview(titleLabel) contentView.addSubview(titleLabel)
subtitleLabel.font = isNormal ? .fus_themeFont(10) : .fus_themeFont(13) subtitleLabel.font = isNormal ? .fus_themeFont(10) : .fus_themeFont(13)
subtitleLabel.text = isNormal ? .fus_versionLocalString("通知是我们主动为您提供讯息服务的重要功能,您可以随时决定收到哪一类的通知") : .fus_versionLocalString("开启通知权限,您可以第一时间收到") subtitleLabel.text = isNormal ? .fus_versionLocalString("通知是我们主动为您提供讯息服务的重要功能,您可以随时决定收到哪一类的通知") : .fus_versionLocalString("開啓通知,您將第一時間收到重要訊息")
subtitleLabel.textColor = isNormal ? .fus_textColorLight2() : .fus_textColorRich() subtitleLabel.textColor = isNormal ? .fus_textColorLight2() : .fus_textColorRich()
subtitleLabel.numberOfLines = 0 subtitleLabel.numberOfLines = 0
contentView.addSubview(subtitleLabel) contentView.addSubview(subtitleLabel)
......
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