Commit 2ff94f76 by pierce

fixed bugs

parent 90d76701
Showing with 817 additions and 344 deletions
......@@ -82,6 +82,7 @@
_userContentController = [[WKUserContentController alloc] init];
_config = [[WKWebViewConfiguration alloc] init];
_config.userContentController = _userContentController;
_config.defaultWebpagePreferences.preferredContentMode = WKContentModeMobile;
_wkWebView = [[WKWebView alloc] initWithFrame:self.bounds configuration:_config];
_wkWebView.navigationDelegate = self;
......@@ -98,6 +99,7 @@
//web背景透明
self.wkWebView.backgroundColor = [UIColor clearColor];
self.wkWebView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
self.wkWebView.opaque = NO;
self.progresslayer = [[CALayer alloc]init];
......
......@@ -5,18 +5,18 @@
"scale" : "1x"
},
{
"filename" : "萤火@2x.png",
"idiom" : "universal",
"filename" : "大萤火icon@2x.png",
"scale" : "2x"
},
{
"filename" : "萤火@3x.png",
"idiom" : "universal",
"filename" : "大萤火icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -5,17 +5,18 @@
"scale" : "1x"
},
{
"filename" : "萤火@2x.png",
"idiom" : "universal",
"filename" : "榜单-萤火icon@2x.png",
"scale" : "2x"
},
{
"filename" : "萤火@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -5,17 +5,18 @@
"scale" : "1x"
},
{
"filename" : "萤火@2x.png",
"idiom" : "universal",
"filename" : "我的-个人空间-收获萤火icon@2x.png",
"scale" : "2x"
},
{
"filename" : "萤火@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -5,17 +5,18 @@
"scale" : "1x"
},
{
"filename" : "萤火@2x.png",
"idiom" : "universal",
"filename" : "我的-收获萤火榜-列表-萤火icon@2x.png",
"scale" : "2x"
},
{
"filename" : "萤火@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -5,18 +5,18 @@
"scale" : "1x"
},
{
"filename" : "萤火@2x.png",
"idiom" : "universal",
"filename" : "chat_im_single_live_record_fire_icon@2x.png",
"scale" : "2x"
},
{
"filename" : "萤火@3x.png",
"idiom" : "universal",
"filename" : "消息-单播通话记录螢火icon-最小@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -5,17 +5,18 @@
"scale" : "1x"
},
{
"filename" : "萤火@2x.png",
"idiom" : "universal",
"filename" : "1_00018.png",
"scale" : "2x"
},
{
"filename" : "萤火@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_1@2x.png",
"filename" : "live_gift_effect_firstSend_animate_0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_10@2x.png",
"filename" : "live_gift_effect_firstSend_animate_1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_11@2x.png",
"filename" : "live_gift_effect_firstSend_animate_10@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_12@2x.png",
"filename" : "live_gift_effect_firstSend_animate_11@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_13@2x.png",
"filename" : "live_gift_effect_firstSend_animate_12@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_14@2x.png",
"filename" : "live_gift_effect_firstSend_animate_13@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_15@2x.png",
"filename" : "live_gift_effect_firstSend_animate_14@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_16@2x.png",
"filename" : "live_gift_effect_firstSend_animate_15@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_17@2x.png",
"filename" : "live_gift_effect_firstSend_animate_16@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_18@2x.png",
"filename" : "live_gift_effect_firstSend_animate_17@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_2@2x.png",
"filename" : "live_gift_effect_firstSend_animate_18@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_3@2x.png",
"filename" : "live_gift_effect_firstSend_animate_19@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_4@2x.png",
"filename" : "live_gift_effect_firstSend_animate_2@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_5@2x.png",
"filename" : "live_gift_effect_firstSend_animate_20@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_6@2x.png",
"filename" : "live_gift_effect_firstSend_animate_21@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_7@2x.png",
"filename" : "live_gift_effect_firstSend_animate_22@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_8@2x.png",
"filename" : "live_gift_effect_firstSend_animate_23@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "live_coin_bg_view_9@2x.png",
"filename" : "live_gift_effect_firstSend_animate_24@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -5,8 +5,8 @@
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_25@2x.png",
"idiom" : "universal",
"filename" : "live_coin_bg_view_0@2x.png",
"scale" : "2x"
},
{
......@@ -15,7 +15,7 @@
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_26@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_27@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_28@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_29@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_3@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_30@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_31@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_32@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_33@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_4@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_5@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_6@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_7@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_8@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_gift_effect_firstSend_animate_9@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -5,17 +5,18 @@
"scale" : "1x"
},
{
"filename" : "萤火@2x.png",
"idiom" : "universal",
"filename" : "单播-资料卡-萤火图标@2x.png",
"scale" : "2x"
},
{
"filename" : "萤火@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -5,18 +5,18 @@
"scale" : "1x"
},
{
"filename" : "萤火@2x.png",
"idiom" : "universal",
"filename" : "螢火提現-中螢火@2x.png",
"scale" : "2x"
},
{
"filename" : "萤火@3x.png",
"idiom" : "universal",
"filename" : "螢火提現-中螢火@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -383,7 +383,22 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调
// 读取队列中消息
FUSSocketMessageModel *messageModel = [mSocketQueue readAcceptMessage];
NSDictionary *jsonDict = [messageModel fus_getJsonDict];
NSString *showAppBinary = jsonDict[@"showAppBinary"];
if ([NSString isNull:showAppBinary] == NO) {
if (showAppBinary.length >= 2) {
if ([[showAppBinary substringWithRange:NSMakeRange(showAppBinary.length - 2, 1)] boolValue] == NO) {
/// 如果传了showAppBinary,
/// 并且showAppBinary大于等于2位(因为fusi是第二位的布尔值表示,且这个数值是从右往左读的,所以要取倒数第二位的数值)
/// 并且showAppBinary的第二位是1
/// 则这个socket在fusi中不处理
if ([FUSConfig sharedInstanced].devConfigs.enableSocketDebug && messageModel.cid) FUSLogInfo(@"--->收到过滤消息:\n showAppBinary = %@", showAppBinary);
return;
}
}
}
// 打印收到的消息
if ([FUSConfig sharedInstanced].devConfigs.enableSocketDebug && messageModel.cid) FUSLogInfo(@"--->收到消息:\n%@", [messageModel fus_getDictionary]);
......
......@@ -24,6 +24,7 @@
@property (nonatomic, assign) int extend1; // 扩展1
@property (nonatomic, assign) int extend2; // 扩展2
@property (nonatomic, copy) NSString *jsondata; // JSON字符串
@property (nonatomic, copy) NSDictionary *jsonDict; // JSON转成字典
#pragma mark -- 实例化方法
......
......@@ -76,7 +76,10 @@
*/
- (NSDictionary *)fus_getJsonDict
{
return [self.jsondata converToDictionary];
if ([NSDictionary isNull:self.jsonDict]) {
self.jsonDict = [self.jsondata converToDictionary];
}
return self.jsonDict;
}
......
......@@ -17,7 +17,7 @@
// View
#import "FUSLiveOutlineLabel.h"
#define INFO_VIEW_HEIGHT 411
#define INFO_VIEW_HEIGHT 338
#define BUTTOM_VIEW_HEIGHT 64
#define ROOM_CONTROL_VIEW_HEIGHT() \
({CGFloat height = 80;\
......@@ -91,12 +91,12 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
// 是否能点击at按钮
@property (nonatomic, assign) BOOL enableAtBtn;
#pragma mark - 评分
//#pragma mark - 评分
// credit
@property (nonatomic, strong) UILabel *creditLabel;
@property (nonatomic, strong) UILabel *remarkLabel;
@property (nonatomic, strong) UIView *starBgView;
@property (nonatomic, strong) NSMutableArray *starImageViews;
//@property (nonatomic, strong) UILabel *creditLabel;
//@property (nonatomic, strong) UILabel *remarkLabel;
//@property (nonatomic, strong) UIView *starBgView;
//@property (nonatomic, strong) NSMutableArray *starImageViews;
#pragma mark - Tags
// tagView的列表
......@@ -300,12 +300,11 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
[self fus_initLevLabel];
[self fus_initSignLabel];
[self fus_initBottomBgView];
[self fus_initCreditUI];
// [self fus_initCreditUI];
[self.bgView fusrtl_setSubViewsToRTL];
[self.clearBgView bringSubviewToFront:_faceImageView];
[self.clearBgView bringSubviewToFront:_richImageView];
// [self.clearBgView bringSubviewToFront:_richWearImageView];
// [self.clearBgView bringSubviewToFront:_richLevelLabel];
[self.clearBgView bringSubviewToFront:_faceBtn];
......@@ -393,8 +392,6 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
_clearBgView.y = UIView.fus_screenH - _clearBgView.height;
_faceImageView.y = 0;
_secrectBgImgView.y = _faceImageView.centerY;
_richImageView.centerX = _faceImageView.centerX;
_richImageView.centerY = _faceImageView.bottom;
// _richWearImageView.center = _faceImageView.center;
[_bgView addRoundedCorners:UIRectCornerTopLeft|UIRectCornerTopRight withRadii:CGSizeMake(16, 16)];
......@@ -416,12 +413,6 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
[bgView addRoundedCorners:UIRectCornerTopLeft|UIRectCornerTopRight withRadii:CGSizeMake(16, 16)];
self.bgView = bgView;
[clearBgView addSubview:self.bgView];
// _userLevelBgImgView = [[UIImageView alloc] initWithFrame:bgView.bounds];
// _userLevelBgImgView.contentMode = UIViewContentModeScaleToFill;
// _userLevelBgImgView.clipsToBounds = YES;
// _userLevelBgImgView.image = [UIImage imageNamed:@"video_chat_userinfo_bg"];
// [self.bgView addSubview:_userLevelBgImgView];
}
- (void)fus_initFaceImageView {
......@@ -442,29 +433,11 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
[self.clearBgView addSubview:_faceImageView];
// 添加头像边框
// _richWearImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, _faceImageView.width * 1.7, _faceImageView.height * 1.9)];
// _richWearImageView.contentMode = UIViewContentModeScaleAspectFit;
// _richWearImageView.center = _faceImageView.center;
// [self.clearBgView addSubview:_richWearImageView];
// 添加富豪等级
// _richLevelLabel = [[FUSLiveOutlineLabel alloc] initWithFrame:CGRectMake((UIView.fus_screenW - 100) * 0.5, 26, 100, 100)];
// _richLevelLabel.font = [UIFont fus_themeBoldFont:17];
// _richLevelLabel.textAlignment = NSTextAlignmentCenter;
// _richLevelLabel.textColor = [UIColor whiteColor];
// _richLevelLabel.strokeWidth = 1;
// [self.clearBgView addSubview:_richLevelLabel];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = _faceImageView.frame;
[btn addTarget:self action:@selector(fus_onClickFaceImageViewAction:) forControlEvents:UIControlEventTouchUpInside];
_faceBtn = btn;
[self.clearBgView addSubview:_faceBtn];
_richImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 15)];
_richImageView.contentMode = UIViewContentModeScaleAspectFit;
[self.clearBgView addSubview:_richImageView];
}
- (void)fus_initReportBtn {
......@@ -483,17 +456,21 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
}
- (void)fus_initNickNameLabel {
_nickNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, _faceImageView.height / 2 + 30, self.bgView.width, 20)];
_nickNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, _faceImageView.height / 2 + 9, self.bgView.width, 20)];
_nickNameLabel.textAlignment = NSTextAlignmentCenter;
_nickNameLabel.textColor = [UIColor fus_textColorRich];
_nickNameLabel.font = [UIFont fus_themeFont:17];;
_nickNameLabel.font = [UIFont fus_themeBoldFont:21];;
[self.bgView addSubview:_nickNameLabel];
_richImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 15)];
_richImageView.contentMode = UIViewContentModeScaleAspectFit;
[self.bgView addSubview:_richImageView];
}
- (void)fus_initSexAndAgeBgView {
_sexAndAgeBgBtn = [UIButton buttonWithType:UIButtonTypeCustom];
_sexAndAgeBgBtn.frame = CGRectMake(self.bgView.width / 2 - (30 / 2) , CGRectGetMaxY(_fireFlyIDLabel.frame) + 24, 30, 17);
_sexAndAgeBgBtn.frame = CGRectMake(self.bgView.width / 2 - (30 / 2) , _fireFlyIDLabel.y, 30, 14);
_sexAndAgeBgBtn.titleLabel.font = [UIFont fus_themeFont:10];;
[_sexAndAgeBgBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[_sexAndAgeBgBtn setBackgroundImage:[UIImage imageNamed:@"video_chat_userinfo_sex_secret_bg"] forState:UIControlStateNormal];
......@@ -501,7 +478,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
}
- (void)fus_initLevLabel {
_levLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(_sexAndAgeBgBtn.frame) + 8 + _sexAndAgeBgBtn.width, _sexAndAgeBgBtn.y, 25, _sexAndAgeBgBtn.height)];
_levLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 25, 14)];
_levLabel.backgroundColor = [UIColor colorWithHex:@"#D6D6D7"];
_levLabel.font = [UIFont fus_themeFont:9];
_levLabel.layer.cornerRadius = 7;
......@@ -512,7 +489,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
}
- (void)fus_initFuSiIDLabel {
_fireFlyIDLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_nickNameLabel.frame) + 6, self.bgView.width, 15)];
_fireFlyIDLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_nickNameLabel.frame) + 10, self.bgView.width, 15)];
_fireFlyIDLabel.textColor = [UIColor fus_textColorMedium];
_fireFlyIDLabel.font = [UIFont fus_themeFont:11];
_fireFlyIDLabel.textAlignment = NSTextAlignmentCenter;
......@@ -520,8 +497,8 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
}
- (void)fus_initSignLabel {
_signLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(_sexAndAgeBgBtn.frame) + 98, self.bgView.width - 30, 15)];
_signLabel.textColor = [UIColor fus_textColorLight];
_signLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(_fireFlyIDLabel.frame) + 55, self.bgView.width - 30, 15)];
_signLabel.textColor = [UIColor fus_textColorRich];
_signLabel.font = [UIFont fus_themeFont:13];
// _signLabel.adjustsFontSizeToFitWidth = YES;
_signLabel.textAlignment = NSTextAlignmentCenter;
......@@ -537,13 +514,12 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
NSArray *imageArr = @[@"video_chat_userinfo_focus",@"video_chat_userinfo_fans",@"video_chat_userinfo_jewel",@"video_chat_userinfo_fire"];
CGFloat viewWidth = self.bgView.width / imageArr.count;
CGFloat viewHeight = _bottomBgView.height;
CGFloat bottomImgOrLabelCenterY = 0;
for (int i = 0; i < imageArr.count; i ++) {
UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(i * viewWidth, 0, viewWidth, viewHeight)];
[_bottomBgView addSubview:bgView];
UILabel *label = label = [[UILabel alloc] initWithFrame:CGRectMake(0, bgView.centerY - 10, bgView.width, 20)];
label.adjustsFontSizeToFitWidth = YES;
label.minimumScaleFactor = 0.5;
label.textColor = UIColor.fus_textColorRich;
label.textAlignment = NSTextAlignmentCenter;
label.font = [UIFont italicSystemFontOfSize:26];
......@@ -552,42 +528,43 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
switch (i) {
case 0:
{
self.focusLabel = label;
self.fansLabel = label;
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.text = FUSLocalizationHelper.localString(@"追踪");
titleLabel.font = [UIFont fus_themeFont:9];
titleLabel.text = FUSLocalizationHelper.localString(@"粉丝");
titleLabel.font = [UIFont fus_themeFont:10];
titleLabel.textColor = [UIColor colorWithHex:@"999999"];
[titleLabel sizeToFit];
[bgView addSubview:titleLabel];
titleLabel.center = CGPointMake(label.centerX, label.bottom + 6 + titleLabel.height / 2.0f);
bottomImgOrLabelCenterY = label.bottom + 6 + titleLabel.height / 2.0f;
titleLabel.center = CGPointMake(label.centerX, bottomImgOrLabelCenterY);
}
break;
case 1:
{
self.fansLabel = label;
// UIView *separateView = [[UIView alloc] initWithFrame:CGRectMake(i *viewWidth, (bgView.height - viewHeight * 0.3) / 2, 0.5, viewHeight * 0.3)];
// separateView.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.4];
// [_bottomBgView addSubview:separateView];
self.focusLabel = label;
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.text = FUSLocalizationHelper.localString(@"粉丝");
titleLabel.font = [UIFont fus_themeFont:9];
titleLabel.text = FUSLocalizationHelper.localString(@"追踪");
titleLabel.font = [UIFont fus_themeFont:10];
titleLabel.textColor = [UIColor colorWithHex:@"999999"];
[titleLabel sizeToFit];
[bgView addSubview:titleLabel];
titleLabel.center = CGPointMake(label.centerX, label.bottom + 6 + titleLabel.height / 2.0f);
titleLabel.center = CGPointMake(label.centerX, bottomImgOrLabelCenterY);
}
break;
case 2:
{
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake((bgView.width - 15) / 2, bgView.centerY + 8, 15,15)];
imageView.centerY = bottomImgOrLabelCenterY;
imageView.contentMode = UIViewContentModeScaleAspectFit;
imageView.image = [UIImage imageNamed:imageArr[i]];
[bgView addSubview:imageView];
label.font = [UIFont fus_themeBoldFont:22];
label.adjustsFontSizeToFitWidth = YES;
label.minimumScaleFactor = 0.5;
self.jewelLabel = label;
self.jewelLabel.textColor = UIColor.fus_diamondBlue;
......@@ -598,19 +575,18 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
break;
case 3:
{
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake((bgView.width - 15) / 2, bgView.centerY + 8, 15,15)];
imageView.centerY = bottomImgOrLabelCenterY;
imageView.contentMode = UIViewContentModeScaleAspectFit;
imageView.image = [UIImage imageNamed:imageArr[i]];
[bgView addSubview:imageView];
label.font = [UIFont fus_themeBoldFont:22];
label.adjustsFontSizeToFitWidth = YES;
label.minimumScaleFactor = 0.5;
self.fireLabel = label;
self.fireLabel.textColor = UIColor.fus_fireGreen;
// UIView *separateView = [[UIView alloc] initWithFrame:CGRectMake(i *viewWidth, (bgView.height - viewHeight * 0.3) / 2, 0.5, viewHeight * 0.3)];
// separateView.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.4];
// [_bottomBgView addSubview:separateView];
}
break;
default:
......@@ -633,11 +609,8 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
return;
}
// _userLevelBgImgView.image = [UIImage imageNamed:@"video_chat_userinfo_bg"];
if (model.isHide.boolValue) {
// _userLevelBgImgView.image = [UIImage imageNamed:@""];
_secrectBgImgView.hidden = NO;
[_secrectBgImgView addSubview:self.secrectBgView];
self.secrectBgView.hidden = NO;
......@@ -665,10 +638,57 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
[_faceImageView setWebImageWithSubURLString:model.face placeholder:[UIImage imageNamed:@"icon_head_default"]];
}
/// ***********
/// 昵称行 :昵称+在线等级+vip
/// ***********
// 昵称
_nickNameLabel.text = model.nickname;
[_nickNameLabel sizeToFit];
// 等级
_levLabel.text = [NSString isNull:model.lev] ? @"0" : [NSString stringWithFormat:@"%@",model.lev];
if (_levLabel.text.length <= 1) {
_levLabel.width = 14;
} else {
_levLabel.width = 20;
}
CGFloat nickLineItemSpace = 3;
CGFloat nickLineWidth = _nickNameLabel.width + nickLineItemSpace + _levLabel.width;
if (model.level.integerValue) {
_richImageView.hidden = NO;
if ([model.privilege[@"richPower"] integerValue] == 1) {
UIImage *vipImg = [UIImage fus_imageWithLevel:model.level.integerValue];
_richImageView.image = vipImg;
if (vipImg) {
_richImageView.width = _richImageView.height / vipImg.size.height * vipImg.size.width;
nickLineWidth += (nickLineItemSpace + _richImageView.width);
}
} else {
_richImageView.hidden = YES;
}
} else {
_richImageView.image = nil;
_richImageView.hidden = YES;
}
self.nickNameLabel.x = (self.bgView.width - nickLineWidth) / 2.0f;
self.levLabel.x = self.nickNameLabel.right + nickLineItemSpace;
self.richImageView.x = self.levLabel.right + nickLineItemSpace;
self.levLabel.centerY = self.nickNameLabel.centerY;
self.richImageView.centerY = self.levLabel.centerY;
/// ***********
/// id行 :id + 性别
/// ***********
// 签名
_signLabel.text = model.sign;
_fireFlyIDLabel.text = [NSString stringWithFormat:@"%@: %@",FUSLocalizationHelper.localString(@"FuSi ID"),model.uid];
[_fireFlyIDLabel sizeToFit];
CGFloat idLineWidth = self.fireFlyIDLabel.width;
// 年龄和性别
if (model.age.integerValue > 99) {
_sexAndAgeBgBtn.titleLabel.font = [UIFont fus_themeFont:8];
......@@ -701,10 +721,14 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
[_sexAndAgeBgBtn setTitle:model.age forState:UIControlStateNormal];
}
// 等级
_levLabel.text = [NSString isNull:model.lev] ? @"0" : [NSString stringWithFormat:@"%@",model.lev];
idLineWidth += nickLineItemSpace + _sexAndAgeBgBtn.width;
self.fireFlyIDLabel.x = (self.width - idLineWidth) / 2.0f;
self.sexAndAgeBgBtn.x = self.fireFlyIDLabel.right + nickLineItemSpace;
self.sexAndAgeBgBtn.centerY = self.fireFlyIDLabel.centerY;
// 签名
_fireFlyIDLabel.text = [NSString stringWithFormat:@"%@: %@",FUSLocalizationHelper.localString(@"FuSi ID"),model.uid];
_signLabel.text = model.sign;
// 粉丝
_fansLabel.text = [self fus_changeUiteWithNumber:model.likeme.integerValue];
// 宝石
......@@ -714,40 +738,9 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
// 萤火
_fireLabel.text = [self fus_changeUiteWithNumber:model.charm.integerValue];
NSInteger sexAndLevSpace = 0;
CGFloat allWidth = 0;
if (model.level.integerValue) {
_richImageView.hidden = NO;
if ([model.privilege[@"richPower"] integerValue] == 1) {
_richImageView.image = [UIImage fus_imageWithLevel:model.level.integerValue];
} else {
_richImageView.hidden = YES;
}
} else {
_richImageView.image = nil;
_richImageView.hidden = YES;
}
if ([NSString isNull:model.constellation]) {
sexAndLevSpace = 0;
} else {
sexAndLevSpace = 8;
}
allWidth += _sexAndAgeBgBtn.width + sexAndLevSpace + _levLabel.width;
CGFloat x = (self.bgView.width - allWidth) / 2;
_sexAndAgeBgBtn.x = x;
_levLabel.x = CGRectGetMaxX(_sexAndAgeBgBtn.frame) + sexAndLevSpace;
[self fus_updateBtnsWithModel:model];
[self fus_setCreditInfoWithCurrentModel];
// [self fus_setCreditInfoWithCurrentModel];
[self fus_resetTagWithModel:model];
[self fus_updateControlViewWithModel:model];
[[FUSLiveHelper shareInstance].currentFunctionView addSubview:self];
......@@ -1114,112 +1107,112 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
#pragma mark - 视讯评分相关的逻辑
- (void)fus_initCreditUI {
self.creditLabel = [[UILabel alloc] init];
self.creditLabel.font = [UIFont fus_themeFont:12];
self.creditLabel.text = FUSLocalizationHelper.localString(@"Credit");
self.creditLabel.textColor = [UIColor colorWithHex:@"#53B9F3"];
[self.creditLabel sizeToFit];
[self.bgView addSubview:self.creditLabel];
_remarkLabel = [[UILabel alloc] init];
_remarkLabel.font = [UIFont fus_themeFont:12];
_remarkLabel.textColor = [UIColor colorWithHex:@"#53B9F3"];
[self.bgView addSubview:_remarkLabel];
_starBgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 50, 8)];
[self.bgView addSubview:_starBgView];
_starImageViews = [NSMutableArray array];
for (int i = 0; i < 5; i ++) {
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake((_starBgView.height+2)*i, 0, _starBgView.height, _starBgView.height)];
imageView.contentMode = UIViewContentModeScaleAspectFit;
[_starBgView addSubview:imageView];
[_starImageViews addObject:imageView];
}
_starBgView.width = _starBgView.height*5 + 2*4;
[_starBgView fusrtl_setSubViewsToRTL];
}
- (void)fus_setCreditInfoWithCurrentModel {
if (self.currentModel.chatWith.avgLevel > 0 && !FUSConfig.sharedInstanced.devConfigs.appStatus) {//设置评分
self.starBgView.hidden = NO;
[self fus_setStarCountWithMark:self.currentModel.chatWith.avgLevel];
self.remarkLabel.text = [NSString stringWithFormat:@"%.1lf", self.currentModel.chatWith.avgLevel];
[self.remarkLabel sizeToFit];
self.creditLabel.y = _sexAndAgeBgBtn.bottom + 25;
CGFloat width = self.creditLabel.width + 8 + self.starBgView.width + 4 + self.remarkLabel.width;
self.creditLabel.x = (self.bgView.width - width) / 2.0f;
self.starBgView.x = self.creditLabel.right + 8;
self.starBgView.centerY = self.creditLabel.centerY;
self.remarkLabel.x = self.starBgView.right + 4;
self.remarkLabel.centerY = self.creditLabel.centerY;
self.remarkLabel.textColor = [UIColor colorWithHex:@"#53B9F3"];
self.creditLabel.textColor = [UIColor colorWithHex:@"#53B9F3"];
[self.creditLabel fusrtl_resetFrameToFitRTL];
[self.starBgView fusrtl_resetFrameToFitRTL];
[self.remarkLabel fusrtl_resetFrameToFitRTL];
} else {
self.starBgView.hidden = YES;
self.remarkLabel.text = FUSLocalizationHelper.localString(@"暂无评分");
[self.remarkLabel sizeToFit];
self.creditLabel.y = _sexAndAgeBgBtn.bottom + 25;
CGFloat width = self.creditLabel.width + 4 + self.remarkLabel.width;
self.creditLabel.x = (self.bgView.width - width) / 2.0f;
self.remarkLabel.x = self.creditLabel.right + 4;
self.remarkLabel.centerY = self.creditLabel.centerY;
self.remarkLabel.textColor = [UIColor colorWithHex:@"666666"];
self.creditLabel.textColor = [UIColor colorWithHex:@"666666"];
[self.creditLabel fusrtl_resetFrameToFitRTL];
[self.remarkLabel fusrtl_resetFrameToFitRTL];
}
}
- (void)fus_setStarCountWithMark:(CGFloat )mark {
if (mark > 0.0) {
self.creditLabel.hidden = NO;
_starBgView.hidden = NO;
_remarkLabel.hidden = NO;
}else{
self.creditLabel.hidden = YES;
_starBgView.hidden = YES;
_remarkLabel.hidden = YES;
return;
}
//整数
NSInteger integer = floor(mark);
//余数
CGFloat remainder = mark - integer;
if (remainder < 0.5) {
remainder = 0;
}
//- (void)fus_initCreditUI {
//
// self.creditLabel = [[UILabel alloc] init];
// self.creditLabel.font = [UIFont fus_themeFont:12];
// self.creditLabel.text = FUSLocalizationHelper.localString(@"Credit");
// self.creditLabel.textColor = [UIColor colorWithHex:@"#53B9F3"];
// [self.creditLabel sizeToFit];
// [self.bgView addSubview:self.creditLabel];
//
// _remarkLabel = [[UILabel alloc] init];
// _remarkLabel.font = [UIFont fus_themeFont:12];
// _remarkLabel.textColor = [UIColor colorWithHex:@"#53B9F3"];
// [self.bgView addSubview:_remarkLabel];
//
// _starBgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 50, 8)];
// [self.bgView addSubview:_starBgView];
//
// _starImageViews = [NSMutableArray array];
//
// for (int i = 0; i < 5; i ++) {
// UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake((_starBgView.height+2)*i, 0, _starBgView.height, _starBgView.height)];
// imageView.contentMode = UIViewContentModeScaleAspectFit;
// [_starBgView addSubview:imageView];
// [_starImageViews addObject:imageView];
// }
// _starBgView.width = _starBgView.height*5 + 2*4;
// [_starBgView fusrtl_setSubViewsToRTL];
//}
//
//- (void)fus_setCreditInfoWithCurrentModel {
//
// if (self.currentModel.chatWith.avgLevel > 0 && !FUSConfig.sharedInstanced.devConfigs.appStatus) {//设置评分
// self.starBgView.hidden = NO;
// [self fus_setStarCountWithMark:self.currentModel.chatWith.avgLevel];
// self.remarkLabel.text = [NSString stringWithFormat:@"%.1lf", self.currentModel.chatWith.avgLevel];
// [self.remarkLabel sizeToFit];
//
// self.creditLabel.y = _sexAndAgeBgBtn.bottom + 25;
// CGFloat width = self.creditLabel.width + 8 + self.starBgView.width + 4 + self.remarkLabel.width;
// self.creditLabel.x = (self.bgView.width - width) / 2.0f;
// self.starBgView.x = self.creditLabel.right + 8;
// self.starBgView.centerY = self.creditLabel.centerY;
//
// self.remarkLabel.x = self.starBgView.right + 4;
// self.remarkLabel.centerY = self.creditLabel.centerY;
// self.remarkLabel.textColor = [UIColor colorWithHex:@"#53B9F3"];
// self.creditLabel.textColor = [UIColor colorWithHex:@"#53B9F3"];
//
// [self.creditLabel fusrtl_resetFrameToFitRTL];
// [self.starBgView fusrtl_resetFrameToFitRTL];
// [self.remarkLabel fusrtl_resetFrameToFitRTL];
// } else {
// self.starBgView.hidden = YES;
//
// self.remarkLabel.text = FUSLocalizationHelper.localString(@"暂无评分");
// [self.remarkLabel sizeToFit];
//
// self.creditLabel.y = _sexAndAgeBgBtn.bottom + 25;
// CGFloat width = self.creditLabel.width + 4 + self.remarkLabel.width;
// self.creditLabel.x = (self.bgView.width - width) / 2.0f;
//
// self.remarkLabel.x = self.creditLabel.right + 4;
// self.remarkLabel.centerY = self.creditLabel.centerY;
// self.remarkLabel.textColor = [UIColor colorWithHex:@"666666"];
// self.creditLabel.textColor = [UIColor colorWithHex:@"666666"];
//
// [self.creditLabel fusrtl_resetFrameToFitRTL];
// [self.remarkLabel fusrtl_resetFrameToFitRTL];
// }
//}
for (int i = 0; i < _starImageViews.count; i++) {
UIImageView *imageView = _starImageViews[i];
if (i < integer) {
imageView.image = [UIImage imageNamed:@"baofang_video_remark_star_light"];
}else{
imageView.image = [UIImage imageNamed:@"baofang_video_remark_star_whole_gray"];
}
}
if (remainder != 0 && integer < _starImageViews.count) {
UIImageView *imageView = _starImageViews[integer];
imageView.image = [[UIImage imageNamed:@"baofang_video_remark_star_half"] fusrtl_imageFlippedForRightToLeftLayoutDirection];
}
}
//- (void)fus_setStarCountWithMark:(CGFloat )mark {
//
// if (mark > 0.0) {
// self.creditLabel.hidden = NO;
// _starBgView.hidden = NO;
// _remarkLabel.hidden = NO;
//
// }else{
// self.creditLabel.hidden = YES;
// _starBgView.hidden = YES;
// _remarkLabel.hidden = YES;
// return;
// }
//
// //整数
// NSInteger integer = floor(mark);
// //余数
// CGFloat remainder = mark - integer;
// if (remainder < 0.5) {
// remainder = 0;
// }
//
// for (int i = 0; i < _starImageViews.count; i++) {
// UIImageView *imageView = _starImageViews[i];
// if (i < integer) {
// imageView.image = [UIImage imageNamed:@"baofang_video_remark_star_light"];
// }else{
// imageView.image = [UIImage imageNamed:@"baofang_video_remark_star_whole_gray"];
// }
// }
// if (remainder != 0 && integer < _starImageViews.count) {
// UIImageView *imageView = _starImageViews[integer];
// imageView.image = [[UIImage imageNamed:@"baofang_video_remark_star_half"] fusrtl_imageFlippedForRightToLeftLayoutDirection];
// }
//}
#pragma mark - 标签信息相关的逻辑
- (void)fus_resetTagWithModel:(FUSRoomUserInfoModel *)model {
......@@ -1238,7 +1231,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
NSArray *tagList = [self fus_tagListWithModel:model];
CGFloat y = self.sexAndAgeBgBtn.bottom + 50;
CGFloat y = self.fireFlyIDLabel.bottom + 25;
CGFloat itemSpace = 5;
CGFloat width = itemSpace;
......
......@@ -107,8 +107,7 @@
}
UIImage *animationImage = [UIImage animatedImageNamed:@"live_coin_bg_view_" duration:1.5];
[_bondBtn setImage:animationImage forState:UIControlStateNormal];
[_bondBtn setImage:UIImage.fus_fireIcon forState:UIControlStateNormal];
_bondBtn.titleEdgeInsets = UIEdgeInsetsMake(0, -5, 0, 5);
}
return self;
......
......@@ -144,12 +144,13 @@
[self.nicknameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.faceImageView.mas_right).offset(12);
make.width.mas_lessThanOrEqualTo(160);
make.top.equalTo(self.faceImageView.mas_top).offset(2);
}];
[self.onlineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.nicknameLabel.mas_right).offset(4);
make.bottom.equalTo(self.faceImageView.mas_bottom);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.height.mas_equalTo(18);
make.width.mas_equalTo(25);
}];
......@@ -168,8 +169,8 @@
}];
[self.genderAndAgeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.onlineLabel.mas_right).offset(5);
make.centerY.equalTo(self.onlineLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel);
make.top.equalTo(self.nicknameLabel.mas_bottom).offset(2);
make.height.mas_equalTo(18);
make.width.mas_equalTo(37);
}];
......@@ -206,63 +207,53 @@
[self.faceImageView setWebImageWithSubURLString:contributeModel.face];
self.nicknameLabel.text = contributeModel.nickname;
BOOL ishide = contributeModel.isHide;
if (ishide) {
self.firstLoveImageView.hidden = YES;
self.onlineLabel.hidden = YES;
self.genderAndAgeBtn.hidden = YES;
} else {
NSInteger level = 0;
BOOL isHide = contributeModel.isHide;
if (contributeModel.isHide) {
level = -1;
} else if ([contributeModel.privilege[@"richPower"] integerValue] == 1) {
if ([contributeModel.privilege[@"richPower"] integerValue] == 1) {
level = contributeModel.level.intValue;
}
self.vipImageView.hidden = level <= 0;
if (level > 0) {
self.vipImageView.image = [UIImage fus_imageWithLevel:level];
if (level <= 30) {
[self.vipImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(13);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel.mas_right).offset(4);
make.left.equalTo(self.onlineLabel.mas_right).offset(4);
}];
} else {
[self.vipImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(13);
make.width.mas_equalTo(26);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel.mas_right).offset(4);
make.left.equalTo(self.onlineLabel.mas_right).offset(4);
}];
}
}
CGFloat firstLoveWidth = 32;
CGFloat firstLoveHeight = 11;
if (isHide) {
self.firstLoveImageView.hidden = YES;
self.onlineLabel.hidden = YES;
self.genderAndAgeBtn.hidden = YES;
} else {
// 是否首充
if ([contributeModel.privilege[@"firstChargePower"] integerValue] == 1) {
self.firstLoveImageView.hidden = NO;
self.firstLoveImageView.image = [UIImage imageNamed:@"live_first_love_img"];
} else if (contributeModel.isNew) {
self.firstLoveImageView.hidden = NO;
self.firstLoveImageView.image = [UIImage imageNamed:@"live_chat_new_user_icon"];
firstLoveWidth = 20;
firstLoveHeight = 20;
} else {
self.firstLoveImageView.hidden = YES;
}
CGFloat firstLoveWidth = 32;
CGFloat firstLoveHeight = 11;
if (self.vipImageView.isHidden && !self.firstLoveImageView.isHidden) {
[self.firstLoveImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(firstLoveWidth);
make.height.mas_equalTo(firstLoveHeight);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel.mas_right).offset(4);
make.left.equalTo(self.onlineLabel.mas_right).offset(4);
}];
} else {
[self.firstLoveImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
......@@ -272,6 +263,28 @@
make.left.equalTo(self.vipImageView.mas_right).offset(4);
}];
}
} else {
if (contributeModel.inPay) {
self.vipImageView.hidden = NO;
self.vipImageView.image = [UIImage imageNamed:@"live_chat_inpay_user_icon"];
[self.vipImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(15);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.left.equalTo(self.onlineLabel.mas_right).offset(4);
}];
} else if (contributeModel.isNew) {
self.vipImageView.hidden = NO;
self.vipImageView.image = [UIImage imageNamed:@"live_chat_new_user_icon"];
[self.vipImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(20);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.left.equalTo(self.onlineLabel.mas_right).offset(4);
}];
} else {
self.vipImageView.hidden = YES;
}
}
self.onlineLabel.hidden = NO;
self.onlineLabel.text = [NSString stringWithFormat:@"%@",contributeModel.lev];
......@@ -291,16 +304,16 @@
if (contributeModel.age.integerValue > 0) {
[self.genderAndAgeBtn setTitle:contributeModel.age forState:UIControlStateNormal];
[self.genderAndAgeBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.onlineLabel.mas_right).offset(5);
make.centerY.equalTo(self.onlineLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel);
make.top.equalTo(self.nicknameLabel.mas_bottom).offset(2);
make.height.mas_equalTo(18);
make.width.mas_equalTo(37);
}];
} else {
[self.genderAndAgeBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.onlineLabel.mas_right).offset(5);
make.centerY.equalTo(self.onlineLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel);
make.top.equalTo(self.nicknameLabel.mas_bottom).offset(2);
make.height.mas_equalTo(18);
make.width.mas_equalTo(18);
}];
......
......@@ -51,6 +51,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 是否新用户
@property (nonatomic, assign) BOOL isNew;
/// 是否付费(0:未付费、1:已付费)
@property (nonatomic, assign) BOOL inPay;
@end
NS_ASSUME_NONNULL_END
......@@ -104,12 +104,13 @@
[self.nicknameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.faceImageView.mas_right).offset(12);
make.top.equalTo(self.faceImageView.mas_top);
make.width.mas_lessThanOrEqualTo(200);
}];
[self.onlineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.nicknameLabel.mas_right).offset(4);
make.top.equalTo(self.nicknameLabel.mas_bottom).offset(2);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.height.mas_equalTo(18);
make.width.mas_equalTo(25);
}];
......@@ -128,8 +129,8 @@
}];
[self.genderAndAgeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.onlineLabel.mas_right).offset(5);
make.centerY.equalTo(self.onlineLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel);
make.top.equalTo(self.nicknameLabel.mas_bottom).offset(2);
make.height.mas_equalTo(18);
make.width.mas_equalTo(37);
}];
......@@ -141,11 +142,15 @@
[self.faceImageView setWebImageWithSubURLString:userModel.face];
self.nicknameLabel.text = userModel.nickname;
NSInteger level = 0;
BOOL ishide = userModel.isHide.boolValue;
if (ishide) {
level = -1;
} else if ([userModel.privilege[@"richPower"] integerValue] == 1) {
self.firstLoveImageView.hidden = YES;
self.onlineLabel.hidden = YES;
self.genderAndAgeBtn.hidden = YES;
} else {
NSInteger level = 0;
if ([userModel.privilege[@"richPower"] integerValue] == 1) {
level = userModel.level.intValue;
}
......@@ -156,46 +161,34 @@
[self.vipImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(13);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel.mas_right).offset(4);
make.left.equalTo(self.onlineLabel.mas_right).offset(4);
}];
} else {
[self.vipImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(13);
make.width.mas_equalTo(26);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel.mas_right).offset(4);
make.left.equalTo(self.onlineLabel.mas_right).offset(4);
}];
}
}
CGFloat firstLoveWidth = 32;
CGFloat firstLoveHeight = 11;
if (ishide) {
self.firstLoveImageView.hidden = YES;
self.onlineLabel.hidden = YES;
self.genderAndAgeBtn.hidden = YES;
} else {
// 是否首充
if ([userModel.privilege[@"firstChargePower"] integerValue] == 1) {
self.firstLoveImageView.hidden = NO;
self.firstLoveImageView.image = [UIImage imageNamed:@"live_first_love_img"];
} else if (userModel.isnew.boolValue) {
self.firstLoveImageView.hidden = NO;
self.firstLoveImageView.image = [UIImage imageNamed:@"live_chat_new_user_icon"];
firstLoveWidth = 20;
firstLoveHeight = 20;
} else {
self.firstLoveImageView.hidden = YES;
}
CGFloat firstLoveWidth = 32;
CGFloat firstLoveHeight = 11;
if (self.vipImageView.isHidden && !self.firstLoveImageView.isHidden) {
[self.firstLoveImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(firstLoveWidth);
make.height.mas_equalTo(firstLoveHeight);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel.mas_right).offset(4);
make.left.equalTo(self.onlineLabel.mas_right).offset(4);
}];
} else {
[self.firstLoveImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
......@@ -205,6 +198,28 @@
make.left.equalTo(self.vipImageView.mas_right).offset(4);
}];
}
} else {
if (userModel.inPay) {
self.vipImageView.hidden = NO;
self.vipImageView.image = [UIImage imageNamed:@"live_chat_inpay_user_icon"];
[self.vipImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(15);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.left.equalTo(self.onlineLabel.mas_right).offset(4);
}];
} else if (userModel.isnew.boolValue) {
self.vipImageView.hidden = NO;
self.vipImageView.image = [UIImage imageNamed:@"live_chat_new_user_icon"];
[self.vipImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(20);
make.centerY.equalTo(self.nicknameLabel.mas_centerY);
make.left.equalTo(self.onlineLabel.mas_right).offset(4);
}];
} else {
self.vipImageView.hidden = YES;
}
}
self.onlineLabel.hidden = NO;
self.onlineLabel.text = [NSString stringWithFormat:@"%@",userModel.lev];
......@@ -225,8 +240,8 @@
[self.genderAndAgeBtn setTitle:userModel.age forState:UIControlStateNormal];
[self.genderAndAgeBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.onlineLabel.mas_right).offset(5);
make.centerY.equalTo(self.onlineLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel);
make.top.equalTo(self.nicknameLabel.mas_bottom).offset(2);
make.height.mas_equalTo(18);
make.width.mas_equalTo(37);
}];
......@@ -235,8 +250,8 @@
self.genderAndAgeBtn.hidden = YES;
}
[self.genderAndAgeBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.onlineLabel.mas_right).offset(5);
make.centerY.equalTo(self.onlineLabel.mas_centerY);
make.left.equalTo(self.nicknameLabel);
make.top.equalTo(self.nicknameLabel.mas_bottom).offset(2);
make.height.mas_equalTo(18);
make.width.mas_equalTo(18);
}];
......
......@@ -30,6 +30,12 @@
// 专属礼物昵称
@property (nonatomic, strong) UILabel *exclusiveNicknameLabel;
/// 首次送礼的标签
@property (nonatomic, strong) UIImageView *sendGiftFirstImageView;
/// 当前显示首次送礼的用户id
@property (nonatomic, copy) NSString *showingFirstSendGiftUserID;
@end
@implementation FUSGiftAnimation
......@@ -158,6 +164,24 @@
[self setupUserinfoLabelView];
[self fus_updateNumberLableWithModel:model animation:NO];
}
// 判断首次送礼
if (model.firstSendGift == 1) {
self.showingFirstSendGiftUserID = model.fromuser.uid;
// 5秒后消失
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(fus_hideFirstSendGift) object:nil];
[self performSelector:@selector(fus_hideFirstSendGift) afterDelay:5];
self.sendGiftFirstImageView.hidden = NO;
[self.sendGiftFirstImageView startAnimating];
}else {
if (self.sendGiftFirstImageView.isHidden == NO && ![model.fromuser.uid isEqualToString:self.showingFirstSendGiftUserID]) {
// 如果并非首次送礼的uid,并且首次送礼还显示了,那么强制隐藏
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(fus_hideFirstSendGift) object:nil];
[self fus_hideFirstSendGift];
}
}
}
// 正则识别 level 字段
......@@ -663,26 +687,26 @@
if (animation) {
[_numberLabel fusrtl_resetFrameToFitRTL];
[UIView animateWithDuration:.2 animations:^{
_bgImageView.frame = CGRectMake(0, self.height - USERINFO_LABLE_HEIGHT * line, labelWidth + 15 + faceX + USERINFO_LABLE_HEIGHT, USERINFO_LABLE_HEIGHT * line);
_bgImageView.centerX = self.width / 2.0;
self.faceImageView.centerY = _bgImageView.height / 2.0f;
self.bgImageView.frame = CGRectMake(0, self.height - USERINFO_LABLE_HEIGHT * line, labelWidth + 15 + faceX + USERINFO_LABLE_HEIGHT, USERINFO_LABLE_HEIGHT * line);
self.bgImageView.centerX = self.width / 2.0;
self.faceImageView.centerY = self.bgImageView.height / 2.0f;
if (FUSRTL.isRTL) {
_faceImageView.x = _faceImageView.superview.width - _faceImageView.width - faceX;
self.faceImageView.x = self.faceImageView.superview.width - self.faceImageView.width - faceX;
} else {
_faceImageView.x = faceX;
self.faceImageView.x = faceX;
}
[self fus_layoutExclusiveViews];
}completion:^(BOOL finished) {
if (animationGroup) {
_numberLabel.alpha = 1;
[_numberLabel.layer addAnimation:animationGroup forKey:nil];
self.numberLabel.alpha = 1;
[self.numberLabel.layer addAnimation:animationGroup forKey:nil];
}
_numberLabel.x = _giftMessageLabel.right + 5;
[_giftMessageLabel fusrtl_resetFrameToFitRTL];
[_senderInfoLabel fusrtl_resetFrameToFitRTL];
[_numberLabel fusrtl_resetFrameToFitRTL];
self.numberLabel.x = self.giftMessageLabel.right + 5;
[self.giftMessageLabel fusrtl_resetFrameToFitRTL];
[self.senderInfoLabel fusrtl_resetFrameToFitRTL];
[self.numberLabel fusrtl_resetFrameToFitRTL];
}];
}else{
......@@ -742,6 +766,33 @@
[_senderInfoLabel fusrtl_resetFrameToFitRTL];
}
/// 隐藏首次送礼的view
-(void)fus_hideFirstSendGift {
[self.sendGiftFirstImageView stopAnimating];
self.sendGiftFirstImageView.hidden = YES;
}
#pragma mark - Other
- (UIImageView *)sendGiftFirstImageView{
if (!_sendGiftFirstImageView) {
_sendGiftFirstImageView = [[UIImageView alloc] initWithFrame:CGRectMake(-12, 0, 64, 28)];
_sendGiftFirstImageView.centerY = 0;
NSMutableArray *imageArr = [[NSMutableArray alloc] init];
for (int i = 0; i <= 33; i++) {
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"live_gift_effect_firstSend_animate_%d", i]];
if (image) {
[imageArr addObject:image];
}
}
_sendGiftFirstImageView.animationImages = imageArr;
_sendGiftFirstImageView.animationDuration = 2;
_sendGiftFirstImageView.animationRepeatCount = 0;
[self.bgImageView addSubview:_sendGiftFirstImageView];
}
return _sendGiftFirstImageView;
}
#pragma mark - Other
- (void)dealloc
......
......@@ -37,6 +37,9 @@
@property (nonatomic, assign) BOOL isMystic;
@property (nonatomic, strong) NSArray *multiNames;
/// 是否是首次送礼:0:否、1:是
@property (nonatomic, assign) NSInteger firstSendGift;
// 从天而降大奖对象
@property (nonatomic, strong) NSDictionary *bigWinVo;
// 持有礼物数据
......
......@@ -404,6 +404,7 @@ typedef NS_ENUM(NSInteger, DisplayAt) {
giftNumModel.toUserList = model.toUserList;
giftNumModel.touser = model.touser;
giftNumModel.isMystic = model.giftModel.isMystic;
giftNumModel.firstSendGift = model.firstSendGift;
if (model.toUserList.count > 0) {
FUSLogInfo(@"");
}
......
......@@ -77,6 +77,10 @@ NS_ASSUME_NONNULL_BEGIN
// 显示所在的礼物条数
@property (nonatomic, assign) NSInteger showIndex;
/// 是否是首次送礼:0:否、1:是
@property (nonatomic, assign) NSInteger firstSendGift;
@end
NS_ASSUME_NONNULL_END
......@@ -65,6 +65,12 @@
// 同时赠送的人数文案
@property (nonatomic, strong) UILabel *senderCountLabel;
/// 首次送礼的标签
@property (nonatomic, strong) UIImageView *sendGiftFirstImageView;
/// 当前显示首次送礼的用户id
@property (nonatomic, copy) NSString *showingFirstSendGiftUserID;
// 礼物名称
//@property (nonatomic, strong) UILabel *giftNameLabel;
......@@ -500,6 +506,23 @@
[self fus_changeNumberViewColorWithLevel:model.fromUserlevel/*InfoModel.level.integerValue*/ number:model.num.integerValue sendType:model.sendType];
}
// 判断首次送礼
if (model.firstSendGift == 1) {
self.showingFirstSendGiftUserID = model.fromuser.uid;
// 5秒后消失
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(fus_hideFirstSendGift) object:nil];
[self performSelector:@selector(fus_hideFirstSendGift) afterDelay:5];
self.sendGiftFirstImageView.hidden = NO;
[self.sendGiftFirstImageView startAnimating];
}else {
if (self.sendGiftFirstImageView.isHidden == NO && ![model.fromuser.uid isEqualToString:self.showingFirstSendGiftUserID]) {
// 如果并非首次送礼的uid,并且首次送礼还显示了,那么强制隐藏
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(fus_hideFirstSendGift) object:nil];
[self fus_hideFirstSendGift];
}
}
}
......@@ -691,10 +714,35 @@
}
//开启特效
_isNumberAnimationFinished = YES;
weakSelf.isNumberAnimationFinished = YES;
//不需要特效
// [weakSelf fus_startEffectWithGiftLevel:weakSelf.currentGiftModel.giftInfoModel.level.integerValue giftAmount:weakSelf.currentGiftModel.num.integerValue];
};
}
/// 隐藏首次送礼的view
- (void)fus_hideFirstSendGift {
[self.sendGiftFirstImageView stopAnimating];
self.sendGiftFirstImageView.hidden = YES;
}
- (UIImageView *)sendGiftFirstImageView{
if (!_sendGiftFirstImageView) {
_sendGiftFirstImageView = [[UIImageView alloc] initWithFrame:CGRectMake(-8, 0, 64, 28)];
_sendGiftFirstImageView.centerY = 0;
NSMutableArray *imageArr = [[NSMutableArray alloc] init];
for (int i = 0; i <= 33; i++) {
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"live_gift_effect_firstSend_animate_%d", i]];
if (image) {
[imageArr addObject:image];
}
}
_sendGiftFirstImageView.animationImages = imageArr;
_sendGiftFirstImageView.animationDuration = 2;
_sendGiftFirstImageView.animationRepeatCount = 0;
[self addSubview:_sendGiftFirstImageView];
}
return _sendGiftFirstImageView;
}
@end
......@@ -1221,7 +1221,7 @@ static FUSLiveGiftView *giftView = nil;
// self.categoryDataSource = tempArr;
// }
[self.segmentView fus_removeSegmentSelectedItems:self.segmentView.currentItemTitles];
[self.segmentView fus_removeSegmentSelectedItems:self.segmentView.itemTitles];
NSMutableArray *titleArr = [NSMutableArray arrayWithCapacity:self.categoryDataSource.count];
__block int offsetX = 0;
......@@ -2828,8 +2828,10 @@ static FUSLiveGiftView *giftView = nil;
}
[self fus_setupCategoryIndex:index forceUpdate:NO];
[self.collectionView reloadData];
if (_collectionView.numberOfSections > _currentCategoryIndex) {
UICollectionViewScrollPosition position = FUSRTL.isRTL ? UICollectionViewScrollPositionRight : UICollectionViewScrollPositionLeft;
[_collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:_currentCategoryIndex] atScrollPosition:position animated:NO];
}
[self fus_updatePageController];
if ([self.selectGiftModel.category isEqualToString:DEW_GIFT_GCID]) {
......
......@@ -341,10 +341,6 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
completion();
}
});
// 销毁引擎
self.agoraEngine = nil;
[AgoraRtcEngineKit destroy];
});
}];
......@@ -352,9 +348,6 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
// 发生错误
FUSLogError(@"连麦:退出频道发生错误 code %d", code);
}
// 释放属性
_agoraEngine = nil;
}
- (void)fus_destroy{
......
......@@ -75,8 +75,10 @@
_muteImageView.hidden = YES;
[self addSubview:_muteImageView];
_richImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.width + 15, self.height + 15)];
_richImageView.center = _faceView.center;
_richImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 26, 13)];
_richImageView.contentMode = UIViewContentModeScaleAspectFit;
_richImageView.centerX = _faceView.centerX;
_richImageView.centerY = _faceView.bottom;
[self addSubview:_richImageView];
_animImgView = [[UIImageView alloc] initWithFrame:_faceView.frame];
......@@ -184,8 +186,7 @@
- (void)layoutSubviews{
[super layoutSubviews];
_faceView.frame = CGRectMake(0, 0, self.height - 10, self.height - 10);
_faceView.frame = CGRectMake(0, 0, CGRectGetHeight(self.bounds) - 10, CGRectGetHeight(self.bounds) - 10);
_faceView.center = CGPointMake(self.width/2.0, self.height/2.0);
_plusLb.centerX = self.centerX;
......@@ -193,7 +194,6 @@
_muteImageView.frame = _faceView.frame;
_muteImageView.layer.cornerRadius = _muteImageView.height/2.0;
_richImageView.frame = CGRectMake(0, 0, 26, 13);
_richImageView.centerX = _faceView.centerX;
_richImageView.centerY = _faceView.bottom;
......
......@@ -56,6 +56,8 @@
// 初始化UI
- (void)initView
{
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fus_bgtapGesture)];
[self.bgScrollView addGestureRecognizer:tapGesture];
// 初始化导航栏
self.title = [NSString stringWithFormat:@"%@%@",FUSLocalizationHelper.localString(@"举报"), self.name?self.name:@""];
[self fus_enableNavigationBackWithPopFunction:popViewController withAnimated:YES];
......@@ -101,6 +103,10 @@
[self fus_requestOptionDataSource];
}
- (void)fus_bgtapGesture {
[self.textView endEditing:YES];
}
- (void)popViewController {
[super popViewController];
[[NSNotificationCenter defaultCenter] postNotificationName:RECHARGE_BACK_TO_CONVERSATION object:@{@"uid":_fid}];
......@@ -275,6 +281,7 @@
// Cell点击回调
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
[self.textView endEditing:YES];
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
if (indexPath.row == _imageArray.count) {
[FUSSelectImageView fus_showPhotos:self isEditing:NO block:^(BOOL isSuccess, UIImage *image) {
......
......@@ -27,7 +27,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="765"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VNg-MC-W4t">
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" keyboardDismissMode="onDrag" translatesAutoresizingMaskIntoConstraints="NO" id="VNg-MC-W4t">
<rect key="frame" x="0.0" y="0.0" width="375" height="765"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="drg-7h-0AL">
......
......@@ -777,7 +777,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
NSDictionary *style = dataDict[@"style"];
if (type == 1) {
NSString *imgUrl = [dataDict[@"imgUrl"] stringValue];
NSString *imgUrl = [dataDict[@"imgUrl"] description];
CGFloat width = [style[@"width"] doubleValue];
CGFloat height = [style[@"height"] doubleValue];
......@@ -792,8 +792,8 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
self.wkVC.navigationItem.titleView = customView;
} else if (type == 2) {
NSString *imgTxt = [dataDict[@"imgTxt"] stringValue];
NSString *color = [dataDict[@"color"] stringValue];
NSString *imgTxt = [dataDict[@"imgTxt"] description];
NSString *color = [dataDict[@"color"] description];
CGFloat fontSize = [dataDict[@"font-size"] doubleValue];
if (fontSize <= 0 || color.length <= 0) {
self.wkVC.navigationItem.title = imgTxt;
......
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