Commit dbdf522c by ludi

提交一些ui

parent bb39a355
Showing with 1361 additions and 128 deletions
......@@ -34,6 +34,9 @@
/// 根据图片名称获取webp图片
+ (UIImage * _Nullable)webpImageName:(NSString * _Nullable)webpImageName;
/// 根据图片名称获取webp图片
+ (UIImage * _Nullable)webpImageName:(NSString * _Nullable)webpImageName scale:(CGFloat)scale;
/// 根据图片名称获取webp图片 (版本性)
+ (UIImage *)versionWebpImageName:(NSString *)webpImageName;
......
......@@ -44,6 +44,13 @@
return image;
}
+ (UIImage *)webpImageName:(NSString *)webpImageName scale:(CGFloat)scale {
NSData *resourceData = [NSData dataWithContentsOfFile:[[self.class bundle] pathForResource:[NSString stringWithFormat:@"%@.webp",webpImageName] ofType:nil]];
YYImage *image = [YYImage imageWithData:resourceData scale:scale];
image.preloadAllAnimatedImageFrames = YES;
return image;
}
+ (UIImage *)versionWebpImageName:(NSString *)webpImageName {
return [self webpImageName:webpImageName];
}
......
......@@ -608,6 +608,12 @@
00E6CDB82F5584BA00B63797 /* FUSLinkMicDataHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E6CDB72F5584BA00B63797 /* FUSLinkMicDataHelper.m */; };
00E6CDB92F5584BA00B63797 /* FUSLinkMicDataHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 00E6CDB62F5584BA00B63797 /* FUSLinkMicDataHelper.h */; };
00E6CDC02F5586AB00B63797 /* FUSLiveRoomSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E6CDBF2F5586AB00B63797 /* FUSLiveRoomSocket.swift */; };
00E6CE1C2F56E36500B63797 /* live_pk_host_win_draw_reward_type2_anim.webp in Resources */ = {isa = PBXBuildFile; fileRef = 00E6CE1B2F56E36500B63797 /* live_pk_host_win_draw_reward_type2_anim.webp */; };
00E6CE1D2F56E36500B63797 /* live_pk_control_contribute_bottom_inpk_animate.webp in Resources */ = {isa = PBXBuildFile; fileRef = 00E6CE192F56E36500B63797 /* live_pk_control_contribute_bottom_inpk_animate.webp */; };
00E6CE1E2F56E36500B63797 /* live_pk_host_win_draw_reward_type1_anim.webp in Resources */ = {isa = PBXBuildFile; fileRef = 00E6CE1A2F56E36500B63797 /* live_pk_host_win_draw_reward_type1_anim.webp */; };
00E6CE202F56F5F200B63797 /* FUSLiveBottomToolWebpButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E6CE1F2F56F5F200B63797 /* FUSLiveBottomToolWebpButton.swift */; };
00E6CE282F56F89F00B63797 /* img_liveroom_input_linkmic_apply_animation.webp in Resources */ = {isa = PBXBuildFile; fileRef = 00E6CE262F56F89F00B63797 /* img_liveroom_input_linkmic_apply_animation.webp */; };
00E6CE292F56F89F00B63797 /* img_liveroom_input_linkmic_waiting_animation.webp in Resources */ = {isa = PBXBuildFile; fileRef = 00E6CE272F56F89F00B63797 /* img_liveroom_input_linkmic_waiting_animation.webp */; };
3E261EA32F2C5F680008C0C0 /* FUSByteHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EA12F2C5F680008C0C0 /* FUSByteHelper.h */; };
3E261EA42F2C5F680008C0C0 /* FUSByteHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E261EA22F2C5F680008C0C0 /* FUSByteHelper.m */; };
3E261EA72F2C5FAB0008C0C0 /* FUSLinkMicMediator.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */; };
......@@ -2480,6 +2486,12 @@
00E6CDB62F5584BA00B63797 /* FUSLinkMicDataHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLinkMicDataHelper.h; sourceTree = "<group>"; };
00E6CDB72F5584BA00B63797 /* FUSLinkMicDataHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLinkMicDataHelper.m; sourceTree = "<group>"; };
00E6CDBF2F5586AB00B63797 /* FUSLiveRoomSocket.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveRoomSocket.swift; sourceTree = "<group>"; };
00E6CE192F56E36500B63797 /* live_pk_control_contribute_bottom_inpk_animate.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = live_pk_control_contribute_bottom_inpk_animate.webp; sourceTree = "<group>"; };
00E6CE1A2F56E36500B63797 /* live_pk_host_win_draw_reward_type1_anim.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = live_pk_host_win_draw_reward_type1_anim.webp; sourceTree = "<group>"; };
00E6CE1B2F56E36500B63797 /* live_pk_host_win_draw_reward_type2_anim.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = live_pk_host_win_draw_reward_type2_anim.webp; sourceTree = "<group>"; };
00E6CE1F2F56F5F200B63797 /* FUSLiveBottomToolWebpButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveBottomToolWebpButton.swift; sourceTree = "<group>"; };
00E6CE262F56F89F00B63797 /* img_liveroom_input_linkmic_apply_animation.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = img_liveroom_input_linkmic_apply_animation.webp; sourceTree = "<group>"; };
00E6CE272F56F89F00B63797 /* img_liveroom_input_linkmic_waiting_animation.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = img_liveroom_input_linkmic_waiting_animation.webp; sourceTree = "<group>"; };
3E261EA12F2C5F680008C0C0 /* FUSByteHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSByteHelper.h; sourceTree = "<group>"; };
3E261EA22F2C5F680008C0C0 /* FUSByteHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSByteHelper.m; sourceTree = "<group>"; };
3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLinkMicMediator.h; sourceTree = "<group>"; };
......@@ -5239,6 +5251,7 @@
BED656102C5B745D00668116 /* FUSRoomShareView.h */,
BED656112C5B745D00668116 /* FUSRoomShareView.m */,
00E6CB0C2F4D523000B63797 /* FUSLiveGameListViewHeader.swift */,
00E6CE1F2F56F5F200B63797 /* FUSLiveBottomToolWebpButton.swift */,
);
path = ChatInputView;
sourceTree = "<group>";
......@@ -7001,6 +7014,11 @@
BEF675A72C6B156500A670FB /* Check */,
BEF675AC2C6B156500A670FB /* FirstTop */,
BEF675EB2C6B156500A670FB /* img_novaList_cell_new_animation.webp */,
00E6CE192F56E36500B63797 /* live_pk_control_contribute_bottom_inpk_animate.webp */,
00E6CE262F56F89F00B63797 /* img_liveroom_input_linkmic_apply_animation.webp */,
00E6CE272F56F89F00B63797 /* img_liveroom_input_linkmic_waiting_animation.webp */,
00E6CE1A2F56E36500B63797 /* live_pk_host_win_draw_reward_type1_anim.webp */,
00E6CE1B2F56E36500B63797 /* live_pk_host_win_draw_reward_type2_anim.webp */,
BEF675EC2C6B156500A670FB /* live_linkmic_bgImg.png */,
BEF675ED2C6B156500A670FB /* live_pk_background_image.png */,
00A1DCF62CA6B2C50000541F /* liveRoom_patAudience_pat_animate.webp */,
......@@ -8380,6 +8398,8 @@
BED65B992C5CE71800668116 /* FUSLiveWecomeEnterView.xib in Resources */,
BEF677A42C6B156600A670FB /* pk_win_streak_6@2x.png in Resources */,
BEF676E72C6B156600A670FB /* PK_Lose_Animation_16@2x.png in Resources */,
00E6CE282F56F89F00B63797 /* img_liveroom_input_linkmic_apply_animation.webp in Resources */,
00E6CE292F56F89F00B63797 /* img_liveroom_input_linkmic_waiting_animation.webp in Resources */,
BEF677B72C6B156600A670FB /* PKAnchorPicBorderAnimation_12@2x.png in Resources */,
BEF676D72C6B156600A670FB /* PK_Lose_Animation_00@2x.png in Resources */,
BEF6762B2C6B156500A670FB /* 2_live_activity_first_charge_bg_2.png in Resources */,
......@@ -8472,6 +8492,9 @@
BEF677C92C6B156600A670FB /* PKBottomBtnBgRotationAnimation_10@3x.png in Resources */,
BEF677D52C6B156600A670FB /* 1_live_first_recharge_package_detail_placeholder.png in Resources */,
BEF677F02C6B156600A670FB /* live_minimize_anim_2@2x.png in Resources */,
00E6CE1C2F56E36500B63797 /* live_pk_host_win_draw_reward_type2_anim.webp in Resources */,
00E6CE1D2F56E36500B63797 /* live_pk_control_contribute_bottom_inpk_animate.webp in Resources */,
00E6CE1E2F56E36500B63797 /* live_pk_host_win_draw_reward_type1_anim.webp in Resources */,
BEF676892C6B156600A670FB /* live_guide_first_top_up_tips_anim_5@2x.png in Resources */,
BEF6763E2C6B156500A670FB /* 2_live_activity_first_charge_bg_21.png in Resources */,
BEF6767B2C6B156600A670FB /* live_gift_item_selected_anim_11@2x.png in Resources */,
......@@ -8516,10 +8539,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FUSShowRoomModule/Pods-FUSShowRoomModule-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FUSShowRoomModule/Pods-FUSShowRoomModule-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FUSShowRoomModule/Pods-FUSShowRoomModule-resources.sh\"\n";
......@@ -8933,6 +8960,7 @@
00E2A4342F1E1614003B779E /* FFPKControlAlertView.swift in Sources */,
00E2A4352F1E1614003B779E /* FFPKControlOCDataDefine.m in Sources */,
00E2A4362F1E1614003B779E /* FFPKPunishTypesView.swift in Sources */,
00E6CE202F56F5F200B63797 /* FUSLiveBottomToolWebpButton.swift in Sources */,
00E2A4372F1E1614003B779E /* FFPKControlWebView.swift in Sources */,
00E2A4382F1E1614003B779E /* FFPKControlSearchPlayerView.swift in Sources */,
00E2A7F72F20EAB5003B779E /* FUSVSIndexGetInfoModel.m in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "img_liveroom_input_linkmic_anchor_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "img_liveroom_input_linkmic_anchor_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "img_liveroom_input_linkmic_audience_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "img_liveroom_input_linkmic_audience_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "img_liveroom_input_linkmic_audience_waiting@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "img_liveroom_input_linkmic_audience_waiting@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "img_liveroom_input_linkmic_onmic_default@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "img_liveroom_input_linkmic_onmic_default@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "img_liveroom_input_linkmic_onmic_mute@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "img_liveroom_input_linkmic_onmic_mute@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_control_contribution_pkStatus_pk_avatar@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_control_contribution_pkStatus_pk_avatar@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_control_opponent_info_bg_blue@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_control_opponent_info_bg_blue@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_control_opponent_info_bg_red@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_control_opponent_info_bg_red@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_control_opponent_mute_off@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_control_opponent_mute_off@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_control_opponent_mute_on@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_control_opponent_mute_on@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_10@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_10@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_2@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_2@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_3@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_3@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_4@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_4@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_5@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_5@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_6@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_6@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_7@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_7@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_8@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_8@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_countdown_9@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_countdown_9@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_btn_action@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_btn_action@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_btn_cancel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_btn_cancel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_btn_face@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_btn_face@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_btn_none@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_btn_none@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_btn_view@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_btn_view@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_btn_voice@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_btn_voice@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_btn_waiting@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_btn_waiting@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_item_action@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_item_action@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_item_desc_btn@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_item_desc_btn@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_item_face@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_item_face@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_item_view@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_item_view@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_punish_select_item_voice@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_punish_select_item_voice@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_top_bg_img_red_left@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_top_bg_img_red_right@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_top_help_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_top_help_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_userlist_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_userlist_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -21,6 +21,7 @@ typedef enum : NSInteger {
FUSLiveBottomToolTypePK, // PK按钮
FUSLiveBottomToolTypeGameEntrance, // 游戏入口
FUSLiveBottomToolTypeInteractionGameEntrance, // 互动游戏入口
FUSLiveBottomToolTypePKGameEntrance, // PK游戏入口
FUSLiveBottomToolTypeTask, // 任务入口
FUSLiveBottomToolTypeExchange, // 兑换入口
FUSLiveBottomToolTypeFirstCharge, // 首充按钮
......
......@@ -177,6 +177,10 @@
// case FUSLiveBottomToolTypeNovaBuild:{
// [self onclickNovaBuild];
// }
case FUSLiveBottomToolTypeLinkMicro: {
[self fus_onClickLinkMicBtnAction];
break;
}
default:
break;
}
......@@ -456,6 +460,44 @@
[self.toolView2 changePKBtnStateImageWithPKBtnStateWithPkBtnState:pkBtnState];
}
- (void)fus_onClickLinkMicBtnAction {
if (FUSLiveHelper.shareInstance.currentFunctionView.linkMicroView.linkMicDataHelper.linkMicState == FUSLiveRoomLinkMicStateNormal) {
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio];
if (authStatus == AVAuthorizationStatusDenied || authStatus == AVAuthorizationStatusRestricted) {
[FUSAlertView showAlertWithTitle:[NSString fus_versionLocalString:@"麦克风不可用"] message:[NSString fus_versionLocalString:@"请前往设置开启麦克风权限"] cancelButtonTitle:[NSString fus_localString:@"取消"] otherButtonTitles:@[[NSString fus_versionLocalString:@"设置"]] clickBlock:^(NSInteger buttonIndex) {
if (buttonIndex == 1) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
}
}];
return;
}
}
if (![FUSSwiftLiveHelper.shared.roomInfoModel.roomId isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid]
&& !FUSSwiftLiveHelper.shared.roomInfoModel.liveControl.boolValue
&& [FUSSwiftLiveHelper.shared roomInfoModel].fansGroup.groupHead == NO) {
// 不是房管和主播
if (FUSLiveHelper.shareInstance.currentFunctionView.linkMicroView.linkMicDataHelper.selfOnMicList) {
FUSLinkMicroModel *model = FUSLiveHelper.shareInstance.currentFunctionView.linkMicroView.linkMicDataHelper.modelsDict[[FUSCacheDataShare shareStore].userDetailInfo.uid];
if (FUSSwiftLiveHelper.shared.selfCloseMic && model.status.integerValue != 2) {
[FUSSwiftLiveHelper.shared.currentFunctionView.linkMicroView fus_switchMicStatus:YES uid:model.uid];
} else if (model.status.integerValue != 2) {
[FUSSwiftLiveHelper.shared.currentFunctionView.linkMicroView fus_switchMicStatus:NO uid:model.uid];
}
} else {
[FUSLiveHelper.shareInstance.currentFunctionView.linkMicroView.linkMicDataHelper fus_changedAudienceSelfRequestMic];
}
return;
} else {
[FUSSwiftLiveHelper.shared.currentFunctionView fus_showLinkMicroListView];
}
}
#pragma mark - 通知相关
- (void)registerNotification
{
......@@ -548,12 +590,12 @@
}
// 是主播或者场控
BOOL isAnchorOrLiveControl = FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor
|| FUSSwiftLiveHelper.shared.roomInfoModel.liveControl.boolValue
|| FUSSwiftLiveHelper.shared.roomInfoModel.fansGroup.groupHead == 1;
if (isAnchorOrLiveControl) {
[toolTypesList appendObject:@(FUSLiveBottomToolTypeLiveManage)];
}
// BOOL isAnchorOrLiveControl = FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor
// || FUSSwiftLiveHelper.shared.roomInfoModel.liveControl.boolValue
// || FUSSwiftLiveHelper.shared.roomInfoModel.fansGroup.groupHead == 1;
// if (isAnchorOrLiveControl) {
// [toolTypesList appendObject:@(FUSLiveBottomToolTypeLiveManage)];
// }
[self.toolView2 showItemWithTypesWithToolTypes:toolTypesList];
}
......
......@@ -196,6 +196,8 @@ typedef NS_ENUM(NSUInteger, FUSLiveChatToolBeautyType) { //美颜工具按钮
- (void)fus_updateRoomScoreType;
- (void)fus_updateLinkMicBtnState;
@end
NS_ASSUME_NONNULL_END
......@@ -59,9 +59,12 @@
@property (nonatomic, strong) UIButton *inputChatBtn;
@property (nonatomic, strong) UIButton *roomScopeBtn;
/// 引导波纹的view
@property (nonatomic, strong) FFUserGuideRippleView *inputChatGuideRippleView;
@property (nonatomic, strong) FUSLiveBottomToolWebpButton *linkMicroBtn;
@property (nonatomic, strong) UIButton *linkMicroBtn;
@property (nonatomic, strong) UIButton *roomScopeBtn;
@property (nonatomic, strong) UIButton *msgBoxBtn;
......@@ -75,6 +78,9 @@
@property (nonatomic, strong) UIButton *gameEntranceBtn;
/// PK游戏按钮
@property (nonatomic, strong) UIButton *pkGameEntranceBtn;
@property (nonatomic, strong) UIButton *taskBtn;
@property (nonatomic, strong) UIButton *firstChargeBtn;
......@@ -145,12 +151,12 @@
@(FUSLiveBottomToolTypeTool2),
@(FUSLiveBottomToolTypeBeautySticker),
@(FUSLiveBottomToolTypeRoomScope),
@(FUSLiveBottomToolTypePK),
@(FUSLiveBottomToolTypeGift)]];
}
}
if (!isHaveGiftBtn) {
[_allBtnTypes removeObject:@(FUSLiveBottomToolTypeGift)];
// [_allBtnTypes removeObject:@(FUSLiveBottomToolTypeGift)];
[self fus_removeBtnWithType:FUSLiveBottomToolTypeGift];
}
[self initBtnsWithTypes:_allBtnTypes];
}else{
......@@ -456,6 +462,11 @@
break;
}
case FUSLiveBottomToolTypePKGameEntrance:
{
btn = self.pkGameEntranceBtn;
break;
}
case FUSLiveBottomToolTypeTask:
{
if (isSelect) {
......@@ -529,6 +540,11 @@
btn = self.roomScopeBtn;
break;
case FUSLiveBottomToolTypeLinkMicro:
[self fus_updateLinkMicBtnImages];
btn = self.linkMicroBtn;
break;
default:
break;
}
......@@ -794,7 +810,21 @@
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeFirstCharge)]) {
_divisionBtnType = FUSLiveBottomToolTypeFirstCharge;
} else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeGameEntrance)]) {
}
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePK)]) {
_divisionBtnType = FUSLiveBottomToolTypePK;
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePKGameEntrance)]) {
_divisionBtnType = FUSLiveBottomToolTypePKGameEntrance;
}
}
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePKGameEntrance)] && [self.allBtnTypes[self.allBtnTypes.count - 2] isEqual: @(FUSLiveBottomToolTypePKGameEntrance)]) {
_divisionBtnType = FUSLiveBottomToolTypePKGameEntrance;
}
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeLinkMicro)]) {
_divisionBtnType = FUSLiveBottomToolTypeLinkMicro;
}
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeGameEntrance)]) {
_divisionBtnType = FUSLiveBottomToolTypeGameEntrance;
} else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) {
_divisionBtnType = FUSLiveBottomToolTypeInteractionGameEntrance;
......@@ -885,6 +915,103 @@
default:
break;
}
[self fus_updateLinkMicBtnState];
}
- (void)fus_updateLinkMicBtnState {
if (FUSSwiftLiveHelper.shared.pkHelper.ocViewModel.currentPKState != FFPKStateNone) {
[self fus_removeBtnWithType:FUSLiveBottomToolTypeLinkMicro];
} else {
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeLinkMicro)] == NO) {
NSInteger lastIndex = 0;
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) {
lastIndex = FUSLiveBottomToolTypeInteractionGameEntrance;
} else {
if (FUSSwiftLiveHelper.shared.liveType == FUSLiveTypeAnchor) {
lastIndex = FUSLiveBottomToolTypeTool2;
} else {
lastIndex = FUSLiveBottomToolTypeShare;
}
}
[self fus_insertBtnWithType:FUSLiveBottomToolTypeLinkMicro
index:[self.allBtnTypes indexOfObject:@(lastIndex)]+1];
}
[self fus_updateLinkMicBtnImages];
}
[self fus_layoutBtnFrame];
}
- (void)fus_updateLinkMicBtnImages {
[self.linkMicroBtn setImage:nil forState:UIControlStateNormal];
BOOL isAnchorOrLiveControl = FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor
|| FUSSwiftLiveHelper.shared.roomInfoModel.liveControl.boolValue
|| FUSSwiftLiveHelper.shared.roomInfoModel.fansGroup.groupHead == 1;
switch (FUSLiveHelper.shareInstance.currentFunctionView.linkMicroView.linkMicDataHelper.linkMicState) {
case FUSLiveRoomLinkMicStateNormal:
if (isAnchorOrLiveControl) {
/// 主播或者场控正常:按鈕灰色底色,麦克风黑色icon,右上角無顯示
self.linkMicroBtn.webpImageView.image = [FUSShowRoomCenterBunble imageNamed:@"img_liveroom_input_linkmic_anchor_normal"];
} else {
///观众正常:按鈕灰色底色,麦克风黑色icon,右上角显示+号
self.linkMicroBtn.webpImageView.image = [FUSShowRoomCenterBunble imageNamed:@"img_liveroom_input_linkmic_audience_normal"];
}
break;
case FUSLiveRoomLinkMicStateSomeoneApplying:
if (FUSLiveHelper.shareInstance.currentFunctionView.linkMicroView.linkMicDataHelper.selfRequestMic) {
/// 观众已申请上麦:按鈕灰色底色,麦克风藍色icon,右上角...三點跳動循環顯示
self.linkMicroBtn.webpImageView.image = [FUSShowRoomCenterBunble webpImageName:@"img_liveroom_input_linkmic_apply_animation" scale:3];
} else if (isAnchorOrLiveControl) {
[self.linkMicroBtn setImage:[FUSShowRoomCenterBunble imageNamed:@"img_liveroom_input_linkmic_audience_waiting"] forState:UIControlStateNormal];
/// 主播或者场控,有人申请上麦:按鈕底色灰色,麥克風藍色icon,右上角小人顯示。外框顯示循環動畫,外框藍色不停旋轉。
self.linkMicroBtn.webpImageView.image = [FUSShowRoomCenterBunble webpImageName:@"img_liveroom_input_linkmic_waiting_animation"];
} else {
///观众正常:按鈕灰色底色,麦克风黑色icon,右上角显示+号
self.linkMicroBtn.webpImageView.image = [FUSShowRoomCenterBunble imageNamed:@"img_liveroom_input_linkmic_audience_normal"];
}
break;
case FUSLiveRoomLinkMicStateSelfOnmic:
if (isAnchorOrLiveControl) {
/// 主播或者场控正常:按鈕灰色底色,麦克风黑色icon,右上角無顯示
self.linkMicroBtn.webpImageView.image = [FUSShowRoomCenterBunble imageNamed:@"img_liveroom_input_linkmic_anchor_normal"];
} else {
/// 已经在麦上
if (FUSLiveHelper.shareInstance.currentFunctionView.linkMicroView.linkMicDataHelper.selfCloseMic) {
self.linkMicroBtn.webpImageView.image = [FUSShowRoomCenterBunble imageNamed:@"img_liveroom_input_linkmic_onmic_mute"];
} else {
/// 閉麥:按鈕灰色底色,麦克风黑色icon,右上角显示黑色聲紋icon,靜態
self.linkMicroBtn.webpImageView.image = [FUSShowRoomCenterBunble imageNamed:@"img_liveroom_input_linkmic_onmic_default"];
}
}
break;
}
MJWeakSelf
FUSLiveHelper.shareInstance.currentFunctionView.linkMicroView.linkMicDataHelper.linkMicStateDidChangedHandler = ^(FUSLiveRoomLinkMicState linkMicState) {
[weakSelf fus_updateLinkMicBtnState];
};
}
/**
......@@ -971,6 +1098,7 @@
[self fus_removeBtnWithType:FUSLiveBottomToolTypeGameEntrance];
[self fus_removeBtnWithType:FUSLiveBottomToolTypeInteractionGameEntrance];
[self fus_removeBtnWithType:FUSLiveBottomToolTypeFirstCharge];
[self fus_removeBtnWithType:FUSLiveBottomToolTypeLinkMicro];
if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAnchor) {
......@@ -985,7 +1113,6 @@
@(FUSLiveBottomToolTypeTool2),
@(FUSLiveBottomToolTypeBeautySticker),
@(FUSLiveBottomToolTypeRoomScope),
@(FUSLiveBottomToolTypePK),
@(FUSLiveBottomToolTypeGift)]];
}
} else {
......@@ -1135,10 +1262,10 @@
return _inputChatBtn;
}
- (UIButton *)linkMicroBtn{
- (FUSLiveBottomToolWebpButton *)linkMicroBtn{
if (!_linkMicroBtn) {
_linkMicroBtn = [UIButton buttonWithType:UIButtonTypeCustom];
_linkMicroBtn = [FUSLiveBottomToolWebpButton buttonWithType:UIButtonTypeCustom];
_linkMicroBtn.tag = FUSLiveBottomToolTypeLinkMicro;
}
return _linkMicroBtn;
......
//
// FUSLiveBottomToolWebpButton.swift
// FUSShowRoomModule
//
// Created by aaa on 2026/3/3.
//
import UIKit
@objc public class FUSLiveBottomToolWebpButton: UIButton {
@objc public lazy var webpImageView: YYAnimatedImageView = {
let imageView = YYAnimatedImageView()
imageView.isUserInteractionEnabled = false
self.addSubview(imageView)
imageView.snp.makeConstraints { make in
make.center.equalToSuperview()
make.width.lessThanOrEqualTo(self.snp.width)
make.height.lessThanOrEqualTo(self.snp.height)
}
return imageView
}()
}
......@@ -37,7 +37,7 @@ import RxCocoa
case .liveFunction:
return [FUSLiveBottomToolTypeTask, FUSLiveBottomToolTypeExchange, FUSLiveBottomToolTypeScreenShot, FUSLiveBottomToolTypeMessageBox, FUSLiveBottomToolTypeMessage, FUSLiveBottomToolTypeAudienceMessage]
case .roomSetting:
return [FUSLiveBottomToolTypeLiveSetting, FUSLiveBottomToolTypeRoomSetting, FUSLiveBottomToolTypeLiveManage/*, .novaBuild*/, FUSLiveBottomToolTypeStartPictureInPicture]
return [FUSLiveBottomToolTypeLiveSetting, FUSLiveBottomToolTypeRoomSetting, FUSLiveBottomToolTypeLiveManage/*, .novaBuild*/, FUSLiveBottomToolTypeStartPictureInPicture, FUSLiveBottomToolTypePK]
case .broadcastFunction:
// return [.RoomScope, .PK]
return [FUSLiveBottomToolTypeRoomScope, FUSLiveBottomToolTypeBeautySticker]
......
......@@ -334,6 +334,8 @@ typedef NS_ENUM(NSInteger, FUSFunctionMode) {
- (void)fus_showAllFunctionLayersWithAnimate:(BOOL)animate;
- (void)fus_showLinkMicroListView;
#pragma mark -- PK
/// 自动根据pkhelper里的状态显示pk控制的view
......
......@@ -1795,65 +1795,129 @@ BDAlphaPlayerMetalViewDelegate
}
}
//- (void)initLinkMicroViewWithAmount:(NSInteger)viewAmount needReloadData:(BOOL)reload{
//
// if (!_linkMicroView) {
// CGFloat viewBgView_x = _chatViewBgView.x + 10;
//
// _linkMicroView = [[FUSLinkMicroUserListView alloc] initWithFrame:CGRectMake(viewBgView_x, _chatViewBgView.y - 60, UIView.fus_screenW, LINKMIC_VIEW_HEIGHT) viewAmount:viewAmount];
// [_linkMicroView fus_setChannelId:[FUSLiveHelper shareInstance].roomInfoModel.channelId roomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId];
// _linkMicroView.micListDelegate = self;
// }else{
//
// [_linkMicroView fus_setChannelId:[FUSLiveHelper shareInstance].roomInfoModel.channelId roomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId];
// [_linkMicroView requestOnlineData];
// }
//
// _linkMicroView.tag = FUSLiveFunctionLayerConnentMic;
//
// [_linkMicroView fus_setUserInfos:@[]];
// FUSLiveFunctionLayerView *layerView = [self fus_viewWithLayer:FUSLiveFunctionLayerConnentMic];
// if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAnchor) {
// // layerView.stayOnScreen = YES;
// }else{
// layerView.stayOnScreen = NO;
// }
//
// if ([FUSLiveHelper shareInstance].liveRoomType == FUSRoomTypeLinkMic) {
// [_linkMicroView fus_joinChannelSuccess:nil failure:nil];
// }
//
// [layerView addSubview:_linkMicroView];
//
// __weak typeof(self) weakSelf = self;
// _linkMicroView.didClickActionHandle = ^(FUSLinkMicroModel *micModel) {
//
// if (![FUSLiveHelper shareInstance].roomInfoModel.liveControl.integerValue &&
// ![[FUSLiveHelper shareInstance].roomInfoModel.roomId isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid]) {
// return;
// }
//
// if (micModel && micModel.uid.integerValue == 0) {
// weakSelf.listView = [[FUSLinkMicroListView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH) channelId:[FUSLiveHelper shareInstance].roomInfoModel.channelId roomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId];
// [weakSelf addSubview:weakSelf.listView];
// [weakSelf.listView showView];
//
// weakSelf.listView.didClickMicroListViewHandle = ^(FUSLinkMicroModel * _Nonnull model, FUSItemViewType itemType) {
// if (itemType == FUSItemViewUserInfo) {
// FUSRoomUserInfoModel *userInfoModel = [[FUSRoomUserInfoModel alloc] init];
// userInfoModel.uid = model.uid;
// [weakSelf.userInfoView fus_showUserInfoViewWithUserInfoViewType:FUSUserInfoViewTypeLive userInfoModel:userInfoModel shouldRequestData:YES];
// }else if(itemType == FUSItemViewCloseMic){
// if ([model.uid isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid] && model.status.integerValue != 2) {
// [weakSelf.linkMicroView fus_switchMicStatus:NO uid:model.uid];
// }
//
// }else if(itemType == FUSItemViewOpenMic){
// if ([model.uid isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid] && [FUSLiveHelper shareInstance].selfCloseMic && model.status.integerValue != 2) {
// [weakSelf.linkMicroView fus_switchMicStatus:YES uid:model.uid];
// }
// }
// };
// }
// };
//
// // PK状态下不显示连麦列表
// if (FUSSwiftLiveHelper.shared.pkHelper.ocViewModel.currentPKState != FFPKStateNone) {
// _linkMicroView.hidden = YES;
// }else{
// _linkMicroView.hidden = NO;
// }
//
// [_linkMicroView fus_resetDelegate];
//
// if (reload) {
// [_linkMicroView requestOnlineData];
// }
//
// [self.bottomToolView fus_updateLinkMicBtnState];
//}
- (void)initLinkMicroViewWithAmount:(NSInteger)viewAmount needReloadData:(BOOL)reload{
if (!_linkMicroView) {
CGFloat viewBgView_x = _chatViewBgView.x + 10;
_linkMicroView = [[FUSLinkMicroUserListView alloc] initWithFrame:CGRectMake(viewBgView_x, _chatViewBgView.y - 60, UIView.fus_screenW, LINKMIC_VIEW_HEIGHT) viewAmount:viewAmount];
[_linkMicroView fus_setChannelId:[FUSLiveHelper shareInstance].roomInfoModel.channelId roomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId];
MJWeakSelf
_linkMicroView.heightDidChangedHandler = ^(CGFloat height) {
weakSelf.linkMicroView.y = weakSelf.chatViewBgView.y - (height + 10);
};
[_linkMicroView fus_setChannelId:FUSSwiftLiveHelper.shared.roomInfoModel.channelId roomId:FUSSwiftLiveHelper.shared.roomInfoModel.roomId];
_linkMicroView.micListDelegate = self;
}else{
[_linkMicroView fus_setChannelId:[FUSLiveHelper shareInstance].roomInfoModel.channelId roomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId];
[_linkMicroView fus_setChannelId:FUSSwiftLiveHelper.shared.roomInfoModel.channelId roomId:FUSSwiftLiveHelper.shared.roomInfoModel.roomId];
[_linkMicroView requestOnlineData];
}
_linkMicroView.tag = FUSLiveFunctionLayerConnentMic;
[_linkMicroView fus_setUserInfos:@[]];
FUSLiveFunctionLayerView *layerView = [self fus_viewWithLayer:FUSLiveFunctionLayerConnentMic];
if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAnchor) {
FUSLiveFunctionLayerView *layerView = (FUSLiveFunctionLayerView *)[self fus_viewWithLayer:FUSLiveFunctionLayerConnentMic];
if (FUSSwiftLiveHelper.shared.liveType == FUSLiveTypeAnchor) {
// layerView.stayOnScreen = YES;
}else{
layerView.stayOnScreen = NO;
}
if ([FUSLiveHelper shareInstance].liveRoomType == FUSRoomTypeLinkMic) {
if (FUSSwiftLiveHelper.shared.liveRoomType == FUSRoomTypeLinkMic) {
[_linkMicroView fus_joinChannelSuccess:nil failure:nil];
}
[layerView addSubview:_linkMicroView];
__weak typeof(self) weakSelf = self;
MJWeakSelf
_linkMicroView.didClickActionHandle = ^(FUSLinkMicroModel *micModel) {
if (![FUSLiveHelper shareInstance].roomInfoModel.liveControl.integerValue &&
![[FUSLiveHelper shareInstance].roomInfoModel.roomId isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid]) {
if (!FUSSwiftLiveHelper.shared.roomInfoModel.liveControl.integerValue
&& [FUSSwiftLiveHelper.shared roomInfoModel].fansGroup.groupHead == NO
&& ![FUSSwiftLiveHelper.shared.roomInfoModel.roomId isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid]) {
return;
}
if (micModel && micModel.uid.integerValue == 0) {
weakSelf.listView = [[FUSLinkMicroListView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH) channelId:[FUSLiveHelper shareInstance].roomInfoModel.channelId roomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId];
[weakSelf addSubview:weakSelf.listView];
[weakSelf.listView showView];
weakSelf.listView.didClickMicroListViewHandle = ^(FUSLinkMicroModel * _Nonnull model, FUSItemViewType itemType) {
if (itemType == FUSItemViewUserInfo) {
FUSRoomUserInfoModel *userInfoModel = [[FUSRoomUserInfoModel alloc] init];
userInfoModel.uid = model.uid;
[weakSelf.userInfoView fus_showUserInfoViewWithUserInfoViewType:FUSUserInfoViewTypeLive userInfoModel:userInfoModel shouldRequestData:YES];
}else if(itemType == FUSItemViewCloseMic){
if ([model.uid isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid] && model.status.integerValue != 2) {
[weakSelf.linkMicroView fus_switchMicStatus:NO uid:model.uid];
}
}else if(itemType == FUSItemViewOpenMic){
if ([model.uid isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid] && [FUSLiveHelper shareInstance].selfCloseMic && model.status.integerValue != 2) {
[weakSelf.linkMicroView fus_switchMicStatus:YES uid:model.uid];
}
}
};
[weakSelf fus_showLinkMicroListView];
}
};
......@@ -1869,42 +1933,133 @@ BDAlphaPlayerMetalViewDelegate
if (reload) {
[_linkMicroView requestOnlineData];
}
[self.bottomToolView fus_updateLinkMicBtnState];
}
- (void)fus_showLinkMicroListView {
[self.listView removeFromSuperview];
self.listView = [[FUSLinkMicroListView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH) channelId:FUSSwiftLiveHelper.shared.roomInfoModel.channelId roomId:FUSSwiftLiveHelper.shared.roomInfoModel.roomId];
[self addSubview:self.listView];
[self.listView showView];
MJWeakSelf
self.listView.didClickMicroListViewHandle = ^(FUSLinkMicroModel * _Nonnull model, FUSItemViewType itemType) {
if (itemType == FUSItemViewUserInfo) {
FUSRoomUserInfoModel *userInfoModel = [[FUSRoomUserInfoModel alloc] init];
userInfoModel.uid = model.uid;
[weakSelf.userInfoView fus_showUserInfoViewWithUserInfoViewType:FUSUserInfoViewTypeLive userInfoModel:userInfoModel shouldRequestData:YES];
}else if(itemType == FUSItemViewCloseMic){
if ([model.uid isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid] && model.status.integerValue != 2) {
[weakSelf.linkMicroView fus_switchMicStatus:NO uid:model.uid];
}
}else if(itemType == FUSItemViewOpenMic){
if ([model.uid isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid] && FUSSwiftLiveHelper.shared.selfCloseMic && model.status.integerValue != 2) {
[weakSelf.linkMicroView fus_switchMicStatus:YES uid:model.uid];
}
}
};
}
//- (void)initPushLinkMicroView{
//
// if (!_pushLinkMicroView) {
// CGFloat viewBgView_x = _pushLinkMicroView.superview.x + 10;
//
// _pushLinkMicroView = [[FUSLinkMicroUserListView alloc] initWithFrame:CGRectMake(viewBgView_x, _pusherChatTableView.superview.y - 60, UIView.fus_screenW, LINKMIC_VIEW_HEIGHT)];
// _pushLinkMicroView.micListDelegate = self;
// }else{
// [_pushLinkMicroView fus_setChannelId:[FUSLiveHelper shareInstance].roomInfoModel.channelId roomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId];
// [_pushLinkMicroView requestOnlineData];
// }
//
// _pushLinkMicroView.tag = FUSLiveFunctionLayerConnentMic;
//
// [_pushLinkMicroView fus_setUserInfos:@[]];
// // FUSLiveFunctionLayerView *layerView = [self.viewLayerArray objectAtIndex:FUSLiveFunctionLayerConnentMic];
// // if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAnchor) {
// //// layerView.stayOnScreen = YES;
// // }else{
// // layerView.stayOnScreen = NO;
// // }
//
// [self.pusherContentView addSubview:_pushLinkMicroView];
//
// __weak typeof(self) weakSelf = self;
// _pushLinkMicroView.didClickActionHandle = ^(FUSLinkMicroModel *micModel) {
//
// if (![FUSLiveHelper shareInstance].roomInfoModel.liveControl.integerValue &&
// ![[FUSLiveHelper shareInstance].roomInfoModel.roomId isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid]) {
// return;
// }
//
// if (micModel && micModel.uid.integerValue == 0) {
// weakSelf.listView = [[FUSLinkMicroListView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH) channelId:[FUSLiveHelper shareInstance].roomInfoModel.channelId roomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId];
// [weakSelf addSubview:weakSelf.listView];
// [weakSelf.listView showView];
//
// weakSelf.listView.didClickMicroListViewHandle = ^(FUSLinkMicroModel * _Nonnull model, FUSItemViewType itemType) {
// if (itemType == FUSItemViewUserInfo) {
// FUSRoomUserInfoModel *userInfoModel = [[FUSRoomUserInfoModel alloc] init];
// userInfoModel.uid = model.uid;
// [weakSelf.userInfoView fus_showUserInfoViewWithUserInfoViewType:FUSUserInfoViewTypeLive userInfoModel:userInfoModel shouldRequestData:YES];
// }else if(itemType == FUSItemViewCloseMic){
// if ([model.uid isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid] && model.status.integerValue != 2) {
// [weakSelf.linkMicroView fus_switchMicStatus:NO uid:model.uid];
// }
//
// }else if(itemType == FUSItemViewOpenMic){
// if ([model.uid isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid] && [FUSLiveHelper shareInstance].selfCloseMic && model.status.integerValue != 2) {
// [weakSelf.linkMicroView fus_switchMicStatus:YES uid:model.uid];
// }
// }
// };
// }
// };
//
// // PK状态下不显示连麦列表
// if (FUSSwiftLiveHelper.shared.pkHelper.ocViewModel.currentPKState != FFPKStateNone) {
// _pushLinkMicroView.hidden = YES;
// }else{
// _pushLinkMicroView.hidden = NO;
// }
//
// _pushLinkMicroView.alpha = 0;
//}
- (void)initPushLinkMicroView{
if (!_pushLinkMicroView) {
CGFloat viewBgView_x = _pushLinkMicroView.superview.x + 10;
_pushLinkMicroView = [[FUSLinkMicroUserListView alloc] initWithFrame:CGRectMake(viewBgView_x, _pusherChatTableView.superview.y - 60, UIView.fus_screenW, LINKMIC_VIEW_HEIGHT)];
MJWeakSelf
_pushLinkMicroView.heightDidChangedHandler = ^(CGFloat height) {
weakSelf.pushLinkMicroView.y = weakSelf.pusherChatTableView.superview.y - (height + 10);
};
_pushLinkMicroView.micListDelegate = self;
}else{
[_pushLinkMicroView fus_setChannelId:[FUSLiveHelper shareInstance].roomInfoModel.channelId roomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId];
[_pushLinkMicroView fus_setChannelId:FUSSwiftLiveHelper.shared.roomInfoModel.channelId roomId:FUSSwiftLiveHelper.shared.roomInfoModel.roomId];
[_pushLinkMicroView requestOnlineData];
}
_pushLinkMicroView.tag = FUSLiveFunctionLayerConnentMic;
[_pushLinkMicroView fus_setUserInfos:@[]];
// FUSLiveFunctionLayerView *layerView = [self.viewLayerArray objectAtIndex:FUSLiveFunctionLayerConnentMic];
// if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAnchor) {
//// layerView.stayOnScreen = YES;
// }else{
// layerView.stayOnScreen = NO;
// }
[self.pusherContentView addSubview:_pushLinkMicroView];
__weak typeof(self) weakSelf = self;
MJWeakSelf
_pushLinkMicroView.didClickActionHandle = ^(FUSLinkMicroModel *micModel) {
if (![FUSLiveHelper shareInstance].roomInfoModel.liveControl.integerValue &&
![[FUSLiveHelper shareInstance].roomInfoModel.roomId isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid]) {
if (!FUSSwiftLiveHelper.shared.roomInfoModel.liveControl.integerValue
&& [FUSSwiftLiveHelper.shared roomInfoModel].fansGroup.groupHead == NO
&& ![FUSSwiftLiveHelper.shared.roomInfoModel.roomId isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid]) {
return;
}
if (micModel && micModel.uid.integerValue == 0) {
weakSelf.listView = [[FUSLinkMicroListView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH) channelId:[FUSLiveHelper shareInstance].roomInfoModel.channelId roomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId];
weakSelf.listView = [[FUSLinkMicroListView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH) channelId:FUSSwiftLiveHelper.shared.roomInfoModel.channelId roomId:FUSSwiftLiveHelper.shared.roomInfoModel.roomId];
[weakSelf addSubview:weakSelf.listView];
[weakSelf.listView showView];
......@@ -1919,7 +2074,7 @@ BDAlphaPlayerMetalViewDelegate
}
}else if(itemType == FUSItemViewOpenMic){
if ([model.uid isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid] && [FUSLiveHelper shareInstance].selfCloseMic && model.status.integerValue != 2) {
if ([model.uid isEqualToString:[FUSCacheDataShare shareStore].userDetailInfo.uid] && FUSSwiftLiveHelper.shared.selfCloseMic && model.status.integerValue != 2) {
[weakSelf.linkMicroView fus_switchMicStatus:YES uid:model.uid];
}
}
......@@ -3173,9 +3328,8 @@ BDAlphaPlayerMetalViewDelegate
[self fus_setLinkMicUI];
self.linkMicExchangeTipView = [[FUSRoomPushNoticeView alloc] initWithXibFileWithShowType:FUSPushNoticeViewTypeLinkMic goToSystemSettingVcBlock:^{
}];
FUSRoomPushNoticeView * linkMicExchangeTipView = [[FUSRoomPushNoticeView alloc] initWithXibFileWithShowType:FUSPushNoticeViewTypeLinkMic goToSystemSettingVcBlock:^{}];
self.linkMicExchangeTipView = linkMicExchangeTipView;
[self.linkMicExchangeTipView fus_showViewWithSuperView:[UIApplication sharedApplication].keyWindow];
}
......
......@@ -74,7 +74,7 @@ static NSString *const kByteRTCMediaStreamTypeBoth = @"kByteRTCMediaStreamTypeBo
}
- (BOOL)fusInChannel{
- (BOOL)fus_inChannel{
if (_role == AgoraClientRoleBroadcaster) {
return NO; // 默认是不在频道
}
......@@ -83,7 +83,7 @@ static NSString *const kByteRTCMediaStreamTypeBoth = @"kByteRTCMediaStreamTypeBo
/// 所有非己方的流静音
/// @param mute 是否静音
- (void)fusMuteAllRemoteAudioStreams:(BOOL)mute {
- (void)fus_muteAllRemoteAudioStreams:(BOOL)mute {
if (_role == AgoraClientRoleBroadcaster) {
......@@ -95,7 +95,7 @@ static NSString *const kByteRTCMediaStreamTypeBoth = @"kByteRTCMediaStreamTypeBo
/// 设置静音
/// @param mute 是否静音
/// @param uid 相关流的ID
- (void)fusMuteAudioStreams:(BOOL)mute uid:(NSString *)uid{
- (void)fus_muteAudioStreams:(BOOL)mute uid:(NSString *)uid{
if (_role == AgoraClientRoleBroadcaster) {
return;
......
......@@ -198,7 +198,7 @@
- (void)receiveUserLinkMicEndResult:(NSNotification *)noti {
FUSSocketMessageModel *messageModel = noti.object;
NSDictionary *dict = [messageModel fus_getDictionary];
NSDictionary *dict = messageModel.jsonDict;
NSString *uid = [dict[@"micId"] description];
if ([uid isEqualToString:[FUSSwiftCacheDataShare share].oc_userInfo.uid]) {
......@@ -230,7 +230,7 @@
- (void)receiveUserLinkMicReplyAskResult:(NSNotification *)noti{
FUSSocketMessageModel *messageModel = noti.object;
NSDictionary *dict = [messageModel fus_getDictionary];
NSDictionary *dict = messageModel.jsonDict;
NSString *uid = [dict[@"micId"] description];
NSInteger status = [dict[@"status"] integerValue];
......@@ -277,7 +277,7 @@
- (void)receiveUserLinkMicOpenMicResult:(NSNotification *)noti{
FUSSocketMessageModel *messageModel = noti.object;
NSDictionary *dict = [messageModel fus_getDictionary];
NSDictionary *dict = messageModel.jsonDict;
NSString *uid = [dict[@"micId"] description];
if ([uid isEqualToString:[FUSSwiftCacheDataShare share].oc_userInfo.uid]) {
......@@ -306,7 +306,7 @@
- (void)receiveUserLinkMicCloseMicResult:(NSNotification *)noti{
FUSSocketMessageModel *messageModel = noti.object;
NSDictionary *dict = [messageModel fus_getDictionary];
NSDictionary *dict = messageModel.jsonDict;
NSString *uid = [dict[@"micId"] description];
if ([uid isEqualToString:[FUSSwiftCacheDataShare share].oc_userInfo.uid]) {
......@@ -338,7 +338,7 @@
- (void)receiveDeleteUserLinkMicResult:(NSNotification *)noti {
FUSSocketMessageModel *messageModel = noti.object;
NSDictionary *dict = [messageModel fus_getDictionary];
NSDictionary *dict = messageModel.jsonDict;
NSString *uid = [dict[@"micId"] description];
NSString *operateNickname = dict[@"operateNickname"];
......@@ -396,7 +396,7 @@
- (void)receiveUserLinkMicSuccessResult:(NSNotification *)noti{
FUSSocketMessageModel *messageModel = noti.object;
NSDictionary *dict = [messageModel fus_getDictionary];
NSDictionary *dict = messageModel.jsonDict;
if (FUSSwiftLiveHelper.shared.liveType == FUSLiveTypeAnchor) {
// 如果有人上下麦的时候,更新礼物列表
......@@ -422,7 +422,7 @@
- (void)receiveUserAskLinkMicResult:(NSNotification *)noti{
FUSSocketMessageModel *messageModel = noti.object;
NSDictionary *dict = [messageModel fus_getDictionary];
NSDictionary *dict = messageModel.jsonDict;
NSString *applyTotal = [dict[@"applyTotal"] description];
NSString *micId = [dict[@"micId"] description];
......@@ -444,7 +444,7 @@
- (void)receiveUserCancelLinkMicResult:(NSNotification *)noti{
FUSSocketMessageModel *messageModel = noti.object;
NSDictionary *dict = [messageModel fus_getDictionary];
NSDictionary *dict = messageModel.jsonDict;
NSString *applyTotal = [dict[@"applyTotal"] description];
self.applyTotal = applyTotal.integerValue;
......@@ -469,7 +469,7 @@
} else if ([noti.object isKindOfClass:[FUSSocketMessageModel class]]) {
FUSSocketMessageModel *messageModel = noti.object;
dict = [messageModel fus_getDictionary];
dict = messageModel.jsonDict;
self.linkMicMode = [dict[@"micWay"] integerValue];
......@@ -499,7 +499,7 @@
- (void)receiveUserLinkSendMicInviteResult:(NSNotification *)noti{
FUSSocketMessageModel *messageModel = noti.object;
NSDictionary *dict = messageModel.fus_getDictionary;
NSDictionary *dict = messageModel.jsonDict;
NSString *uid = [dict[@"micId"] description];
NSString *nickname = [dict[@"nickname"] description];
_anchorName = nickname;
......@@ -579,7 +579,7 @@
- (void)receiveLinkMicInviteRespone:(NSNotification *)noti {
FUSSocketMessageModel *messageModel = noti.object;
NSDictionary *dict = [messageModel fus_getDictionary];
NSDictionary *dict = messageModel.jsonDict;
NSString *status = [dict[@"status"] description];
NSString *inviteId = [dict[@"inviteUserId"] description];
// 不是自己邀请的不用弹
......
......@@ -53,10 +53,10 @@ enum FFPKSocketCID {
@objcMembers public class FFPKNotification: NSObject {
/// 连麦状态下,自己或者对方离开频道通知
@objc public static let rtcDidOffLine = "kYAStreamRTCDidOfflineNotification"
@objc public static let rtcDidOffLine = "kFUSStreamRTCDidOfflineNotification"
/// 连麦状态下,对方成功加入到频道内通知
@objc public static let rtcOthersDidJoinedChannel = "kYAStreamRTCDidOtherJoinedChannelNotification"
@objc public static let rtcOthersDidJoinedChannel = "kFUSStreamRTCDidOtherJoinedChannelNotification"
/// 接收到拉流成功播放
@objc public static let streamDidPlay = "kStreamPlayViewDidStartPlayNotification"
......
......@@ -366,14 +366,19 @@ public extension FFPKHelper {
// 接收到拉流成功播放
NotificationCenter.default.rx
.notification(NSNotification.Name(rawValue: FFPKNotification.streamDidPlay)).subscribe(onNext:{[weak self] notification in
print("wegewgwegwe111")
guard let self = self else { return }
guard let dict = notification.object as? Dictionary<String, Any> else { return }
print("wegewgwegwe222:\(dict)")
if let uid = dict["uid"] as? String {
print("wegewgwegwe3333:\(uid)")
self.ff_setPKRoomPlayLoadingStatus(roomId: uid, isLoading: false)
if uid == self.viewModel.value.localAnchorModel.value.uid {
self.viewModel.value.localAnchorModel.value.hasLink.accept(true)
print("wegewgwegwe4444:\(self.viewModel.value.localAnchorModel.value.uid)")
} else if uid == self.viewModel.value.remoteAnchorModel.value.uid {
self.viewModel.value.remoteAnchorModel.value.hasLink.accept(true)
print("wegewgwegwe5555:\(self.viewModel.value.remoteAnchorModel.value.uid)")
}
}
})
......@@ -855,7 +860,7 @@ public extension FFPKHelper {
func ff_setPKRoomPlayLoadingStatus(roomId:String, isLoading:Bool) {
print("wegewgwegwe666 uid:\(roomId)--isloading:\(isLoading)")
if roomId == self.viewModel.value.localAnchorModel.value.uid {
self.viewModel.value.localAnchorModel.value.isLoading.accept(isLoading)
}
......
......@@ -77,7 +77,7 @@ class FFPKReadyGoCountDownAnimation: FUSBaseView {
}
}
self.animImageView.image = FUSShowRoomCenterBunble.versionImageNamed("live_pk_countdown_\(index)")
self.animImageView.image = FUSShowRoomCenterBunble.imageNamed("live_pk_countdown_\(index)")
self.animImageView.transform = .init(scaleX: 1.3, y: 1.3)
self.animImageView.alpha = 0
self.animImageView.isHidden = false
......
......@@ -45,7 +45,7 @@ import RxSwift
self.onceMoreBtn.layer.cornerRadius = 11
self.onceMoreBtn.layer.masksToBounds = true
self.onceMoreBtn.isHidden = true
self.onceMoreBtn.style = .gradient
self.onceMoreBtn.style = .blue
self.onceMoreBtn.setTitle(.fus_versionLocalString("再来一场"), for: .normal)
self.onceMoreBtn.setTitleColor(.init(hex: "#22222B"), for: .normal)
self.onceMoreBtn.titleLabel?.font = .fus_themeBoldFont(11)
......
......@@ -16,7 +16,7 @@ class FFPKTopStateCountdownView: FUSBaseView {
let helpBtn = UIButton(type: .custom)
let contentTapBtn = UIButton(type: .custom)
let pkIconImageView = UIImageView(image: FUSShowRoomCenterBunble.versionImageNamed("live_pk_icon"))
let pkIconImageView = UIImageView(image: FUSShowRoomCenterBunble.imageNamed("live_pk_control_title_image"))
let pkStateLabel = UILabel()
let timeLabel = UILabel()
......@@ -109,7 +109,7 @@ class FFPKTopStateCountdownView: FUSBaseView {
// }
self.helpBtn.setImage(FUSShowRoomCenterBunble.versionImageNamed("live_pk_top_help_icon"), for: .normal)
self.helpBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_top_help_icon"), for: .normal)
// self.helpBtn.rx.tap.subscribe(onNext: { _ in
//
// let _ = FFPKControlAlertView.ff_createPKHelper(showOn: FUSSwiftLiveHelper.shared.currentFunctionView?.fus_view(with: .autoPopView)) {
......@@ -139,9 +139,9 @@ class FFPKTopStateCountdownView: FUSBaseView {
guard let self = self else { return }
if localAnchorModel.sideColor == .red {
self.bgimageView.image = FUSShowRoomCenterBunble.versionImageNamed("live_pk_top_bg_img_red_left")
self.bgimageView.image = FUSShowRoomCenterBunble.imageNamed("live_pk_top_bg_img_red_left")
} else {
self.bgimageView.image = FUSShowRoomCenterBunble.versionImageNamed("live_pk_top_bg_img_red_right")
self.bgimageView.image = FUSShowRoomCenterBunble.imageNamed("live_pk_top_bg_img_red_right")
}
}).disposed(by: viewModel.matchDisposeBag)
......
......@@ -11,7 +11,7 @@ import RxSwift
class FFPKUserContributeView: FUSBaseView {
let bgImageView = UIImageView(image: FUSShowRoomCenterBunble.versionImageNamed("live_pk_userlist_bg"))
let bgImageView = UIImageView(image: FUSShowRoomCenterBunble.imageNamed("live_pk_userlist_bg"))
let contentView = UIView()
let localSideUserListView = FFPKUserContributeListView()
......@@ -59,9 +59,9 @@ class FFPKUserContributeView: FUSBaseView {
guard let self = self else { return }
if localAnchorModel.sideColor == .red {
self.bgImageView.image = FUSShowRoomCenterBunble.versionImageNamed("live_pk_userlist_bg")
self.bgImageView.image = FUSShowRoomCenterBunble.imageNamed("live_pk_userlist_bg")
} else {
self.bgImageView.image = FUSShowRoomCenterBunble.versionImageNamed("live_pk_userlist_bg")?.fus_imageFlippedMirrored()
self.bgImageView.image = FUSShowRoomCenterBunble.imageNamed("live_pk_userlist_bg")?.fus_imageFlippedMirrored()
}
}).disposed(by: disposeBag)
......
......@@ -249,7 +249,7 @@ class FFPKControlSearchPlayerPlayerListCell: UITableViewCell {
let disposeBag = DisposeBag()
let avatarTapBtn = UIButton(type: .custom)
let bgImageView = UIImageView(image: FUSShowRoomCenterBunble.versionImageNamed("live_pk_control_search_player_middle_bg"))
let bgImageView = UIImageView()
let faceView = FUSRichIconView(frame: CGRectMake(0, 0, 40, 40))
let richImageView = UIImageView(frame: .init(x: 0, y: 0, width: 37, height: 14))
let nicknameLabel = UILabel()
......@@ -257,6 +257,18 @@ class FFPKControlSearchPlayerPlayerListCell: UITableViewCell {
let lineView = UIView()
func makeUI(){
let topBgColorView = UIView()
topBgColorView.backgroundColor = .init(hex: "#F0F0F0")
self.addSubview(topBgColorView)
topBgColorView.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(16)
make.top.equalToSuperview()
make.height.equalTo(10)
}
bgImageView.backgroundColor = .init(hex: "#F0F0F0")
bgImageView.layer.cornerRadius = 8
bgImageView.layer.masksToBounds = true
bgImageView.isUserInteractionEnabled = true
self.contentView.addSubview(bgImageView)
bgImageView.snp.makeConstraints { make in
......@@ -353,10 +365,10 @@ class FFPKControlSearchPlayerPlayerListCell: UITableViewCell {
if isLasCell {
self.lineView.isHidden = true
self.bgImageView.image = FUSShowRoomCenterBunble.versionImageNamed("live_pk_control_search_player_bottom_bg")
self.bgImageView.layer.cornerRadius = 8
}else {
self.lineView.isHidden = false
self.bgImageView.image = FUSShowRoomCenterBunble.versionImageNamed("live_pk_control_search_player_middle_bg")
self.bgImageView.layer.cornerRadius = 0
}
if model.status == -1 {
......
......@@ -45,7 +45,7 @@ class FFPKPunishSelectPunishCell: UICollectionViewCell {
}
nameLabel.font = .fus_themeMediumFont(11)
nameLabel.textColor = .fus_theme()
nameLabel.textColor = .fus_textColorRich()
nameLabel.textAlignment = .center
nameLabel.numberOfLines = 2
bgImage.addSubview(nameLabel)
......@@ -85,7 +85,7 @@ class FFPKPunishSelectPunishCell: UICollectionViewCell {
}
otherNickNameLabel.font = .fus_themeMediumFont(8)
otherNickNameLabel.textColor = .white
otherNickNameLabel.textColor = .fus_textColorDeep()
lockView.addSubview(otherNickNameLabel)
otherNickNameLabel.snp.makeConstraints { make in
make.left.equalTo(otherFaceImageView.snp.right).offset(2)
......@@ -100,7 +100,7 @@ class FFPKPunishSelectPunishCell: UICollectionViewCell {
make.size.equalTo(CGSizeMake(14, 14))
}
descBtn.setImage(FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_item_desc_btn"), for: .normal)
descBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_item_desc_btn"), for: .normal)
descBtn.contentMode = .scaleAspectFit
bgImage.addSubview(descBtn)
descBtn.snp.makeConstraints { make in
......@@ -172,13 +172,13 @@ extension FFVSPunishGetListDataModel{
func ff_getSelectPunishCellImage() -> UIImage? {
switch self.type{
case 1:
return FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_item_face")
return FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_item_face")
case 2:
return FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_item_action")
return FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_item_action")
case 3:
return FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_item_voice")
return FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_item_voice")
case 4:
return FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_item_view")
return FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_item_view")
default:
return nil
}
......
......@@ -103,7 +103,9 @@ public class FFPKControlContributionView: FFPKControlSubBaseView {
emptyView.backgroundColor = .clear
self.emptyView.fus_setEmptyViewIcon(.fus_emptyImg(), title: .fus_versionLocalString("暂无数据"), buttonTittle: "")
let bottomBgView = UIImageView(image: FUSShowRoomCenterBunble.versionImageNamed("live_pk_control_contribute_bottom_bg"))
let bottomBgView = UIImageView()
bottomBgView.backgroundColor = .white
bottomBgView.fus_addShadow()
bottomBgView.isUserInteractionEnabled = true
self.contentView.addSubview(bottomBgView)
bottomBgView.snp.makeConstraints { make in
......@@ -576,14 +578,14 @@ class FFPKControlContributionPkStatusView: FUSBaseView {
switch pkStatus{
case .matching:
self.pkHeadImageView.image = FUSShowRoomCenterBunble.versionImageNamed("live_pk_control_contribution_pkStatus_pk_avatar")
self.pkHeadImageView.image = FUSShowRoomCenterBunble.imageNamed("live_pk_control_contribution_pkStatus_pk_avatar")
self.pkHeadImageView.snp.remakeConstraints { make in
make.left.equalTo(24)
make.centerY.equalToSuperview()
make.size.equalTo(CGSizeMake(40, 40))
}
self.pkIconImageView.isHidden = true
self.descLabel.textColor = .init(hex: "#808080")
self.descLabel.textColor = .fus_textColorLight()
self.descLabel.text = .fus_versionLocalString("匹配对手中")
BehaviorRelay<Int>
.interval(.seconds(1), scheduler: MainScheduler.instance)
......@@ -593,14 +595,14 @@ class FFPKControlContributionPkStatusView: FUSBaseView {
.disposed(by: matchingDotDisposed)
case .waitingAccept:
self.pkHeadImageView.image = FUSShowRoomCenterBunble.versionImageNamed("live_pk_control_contribution_pkStatus_pk_avatar")
self.pkHeadImageView.image = FUSShowRoomCenterBunble.imageNamed("live_pk_control_contribution_pkStatus_pk_avatar")
self.pkHeadImageView.snp.remakeConstraints { make in
make.left.equalTo(24)
make.centerY.equalToSuperview()
make.size.equalTo(CGSizeMake(40, 40))
}
self.pkIconImageView.isHidden = true
self.descLabel.textColor = .init(hex: "#808080")
self.descLabel.textColor = .fus_textColorLight()
self.descLabel.text = .fus_versionLocalString("等候对手接受PK")
......@@ -612,7 +614,7 @@ class FFPKControlContributionPkStatusView: FUSBaseView {
make.size.equalTo(CGSizeMake(40, 40))
}
self.pkIconImageView.isHidden = false
self.descLabel.textColor = .white
self.descLabel.textColor = .fus_textColorRich()
self.descLabel.text = nickName
}
......
......@@ -33,7 +33,7 @@ class FFPKControlOpponentView: FFPKControlSubBaseView {
}
pkNameLabel.font = .fus_themeMediumFont(15)
pkNameLabel.textColor = .white
pkNameLabel.textColor = .fus_textColorRich()
self.contentView.addSubview(pkNameLabel)
pkNameLabel.snp.makeConstraints { make in
make.left.equalTo(16)
......@@ -169,7 +169,7 @@ class FFPKControlOpponentInfoView: FUSBaseView {
var muteClickHandler: ((Bool) -> Void)?
let avatarTapBtn = UIButton(type: .custom)
let bgImageView = UIImageView(image: FUSShowRoomCenterBunble.versionImageNamed("live_pk_control_opponent_info_bg"))
let bgImageView = UIImageView(image: FUSShowRoomCenterBunble.imageNamed("live_pk_control_opponent_info_bg_blue"))
let faceView = FUSRichIconView(frame: CGRectMake(0, 0, 40, 40))
let richImageView = UIImageView(frame: .init(x: 0, y: 0, width: 37, height: 14))
let nicknameLabel = UILabel()
......@@ -224,8 +224,8 @@ class FFPKControlOpponentInfoView: FUSBaseView {
make.centerY.equalToSuperview()
}
muteBtn.setImage(FUSShowRoomCenterBunble.versionImageNamed("live_pk_control_opponent_mute_off"), for: .normal)
muteBtn.setImage(FUSShowRoomCenterBunble.versionImageNamed("live_pk_control_opponent_mute_on"), for: .selected)
muteBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_control_opponent_mute_off"), for: .normal)
muteBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_control_opponent_mute_on"), for: .selected)
bgImageView.addSubview(muteBtn)
muteBtn.snp.makeConstraints { make in
make.right.equalTo(-20)
......@@ -285,6 +285,13 @@ class FFPKControlOpponentInfoView: FUSBaseView {
}
}
if model.sideColor == .red {
self.bgImageView.image = FUSShowRoomCenterBunble.imageNamed("live_pk_control_opponent_info_bg_red")
}
else {
self.bgImageView.image = FUSShowRoomCenterBunble.imageNamed("live_pk_control_opponent_info_bg_blue")
}
self.faceView.fus_setupIcon(withFacePath: model.face ?? "", level: level)
self.nicknameLabel.text = model.nickname?.removingPercentEncoding
}
......
......@@ -415,9 +415,9 @@ extension FFPKMessageAlertView{
self.ff_setTitle(type: 1)
textLabel.attributedText = .sj.makeText({ make in
make.append(nickName).textColor(.fus_textColorRich())
make.append(nickName).textColor(.init(hex: "#9C9B9E"))
make.append(" ")
make.append(.fus_versionLocalString("拒绝了您的PK邀请")).textColor(.white)
make.append(.fus_versionLocalString("拒绝了您的PK邀请")).textColor(.fus_textColorRich())
make.font(.fus_themeMediumFont(15))
})
......
......@@ -33,7 +33,7 @@ class FFPKPunishDetailAlertView: FFPKControlSubBaseView {
}
titleLabel.font = .fus_themeMediumFont(18)
titleLabel.textColor = .white
titleLabel.textColor = .fus_textColorRich()
titleLabel.text = .fus_versionLocalString("惩罚详情")
naviView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
......@@ -71,7 +71,7 @@ class FFPKPunishDetailAlertView: FFPKControlSubBaseView {
}
punishNameLabel.font = .fus_themeMediumFont(15)
punishNameLabel.textColor = .white
punishNameLabel.textColor = .fus_textColorRich()
punishNameLabel.textAlignment = .center
punishBgView.addSubview(punishNameLabel)
punishNameLabel.snp.makeConstraints { make in
......@@ -96,7 +96,7 @@ class FFPKPunishDetailAlertView: FFPKControlSubBaseView {
}
punishTypeLabel.font = .fus_themeMediumFont(15)
punishTypeLabel.textColor = .white
punishTypeLabel.textColor = .fus_textColorRich()
contentView.addSubview(punishTypeLabel)
punishTypeLabel.snp.makeConstraints { make in
make.left.equalTo(punishTypeIconImageView.snp.right).offset(6)
......
......@@ -39,7 +39,7 @@ class FFPKPunishSelectAlertView: FFPKControlSubBaseView {
contentView.addRoundedCorners(UIRectCorner(rawValue: UIRectCorner(rawValue: UIRectCorner.topRight.rawValue | UIRectCorner.topLeft.rawValue).rawValue), withRadii: CGSizeMake(14, 14))
titleLabel.font = .fus_themeMediumFont(18)
titleLabel.textColor = .white
titleLabel.textColor = .fus_textColorRich()
titleLabel.text = .fus_versionLocalString("选择本场PK惩罚")
naviView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
......@@ -55,7 +55,7 @@ class FFPKPunishSelectAlertView: FFPKControlSubBaseView {
}
countDownLabel.font = .fus_themeFont(13)
countDownLabel.textColor = .white
countDownLabel.textColor = .fus_textColorRich()
countDownLabel.text = "0:00"
naviView.addSubview(countDownLabel)
countDownLabel.snp.makeConstraints { make in
......@@ -247,16 +247,16 @@ class FFPKPunishSelectAlertView: FFPKControlSubBaseView {
else {
selectItem.closeBtn.isHidden = true
if self.selectedPunishList.count == index {
selectItem.setImage(FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_btn_waiting"), for: .normal)
selectItem.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_btn_waiting"), for: .normal)
}else {
selectItem.setImage(FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_btn_none"), for: .normal)
selectItem.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_btn_none"), for: .normal)
}
}
}
self.selectCountLabel.attributedText = .sj.makeText({ make in
make.append("\(self.selectedPunishList.count)/").textColor(.fus_theme())
make.append("\(self.vsPunishMaxLimit)").textColor(.white)
make.append("\(self.vsPunishMaxLimit)").textColor(.fus_textColorDeep())
make.font(.fus_themeFont(13))
})
......@@ -370,7 +370,7 @@ class FFPKPunishSelectItemButton: UIButton {
func makeUI() {
closeBtn.setImage(FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_btn_cancel"), for: .normal)
closeBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_btn_cancel"), for: .normal)
closeBtn.isHidden = true
self.addSubview(closeBtn)
closeBtn.snp.makeConstraints { make in
......@@ -386,13 +386,13 @@ extension FFVSPunishGetListDataModel{
func ff_getSelectedItemBtnImage() -> UIImage? {
switch self.type{
case 1:
return FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_btn_face")
return FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_btn_face")
case 2:
return FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_btn_action")
return FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_btn_action")
case 3:
return FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_btn_voice")
return FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_btn_voice")
case 4:
return FUSShowRoomCenterBunble.versionImageNamed("live_pk_punish_select_btn_view")
return FUSShowRoomCenterBunble.imageNamed("live_pk_punish_select_btn_view")
default:
return nil
}
......
......@@ -44,6 +44,8 @@ class FFPKPunishSelectDetailAlertView: FUSBaseView {
make.edges.equalToSuperview()
}
contentView.layer.cornerRadius = 8
contentView.layer.masksToBounds = true
contentView.backgroundColor = .white
contentView.isUserInteractionEnabled = true
self.addSubview(contentView)
......@@ -53,7 +55,7 @@ class FFPKPunishSelectDetailAlertView: FUSBaseView {
}
titleLabel.font = .fus_themeMediumFont(20)
titleLabel.textColor = .white
titleLabel.textColor = .fus_textColorRich()
titleLabel.text = .fus_versionLocalString("PK惩罚详情")
contentView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
......@@ -62,7 +64,7 @@ class FFPKPunishSelectDetailAlertView: FUSBaseView {
}
let punishBgView = UIView()
punishBgView.backgroundColor = .init(hex: "#42424F", alpha: 0.2)
punishBgView.backgroundColor = .init(hex: "#42424F", alpha: 0.1)
punishBgView.layer.cornerRadius = 18
punishBgView.layer.masksToBounds = true
contentView.addSubview(punishBgView)
......@@ -82,7 +84,7 @@ class FFPKPunishSelectDetailAlertView: FUSBaseView {
}
punishNameLabel.font = .fus_themeFont(14)
punishNameLabel.textColor = .white
punishNameLabel.textColor = .fus_textColorRich()
punishNameLabel.textAlignment = .left
punishNameLabel.numberOfLines = 0
contentView.addSubview(punishNameLabel)
......@@ -92,7 +94,7 @@ class FFPKPunishSelectDetailAlertView: FUSBaseView {
}
punishTypeLabel.font = .fus_themeFont(14)
punishTypeLabel.textColor = .white
punishTypeLabel.textColor = .fus_textColorRich()
punishTypeLabel.textAlignment = .left
punishTypeLabel.numberOfLines = 0
contentView.addSubview(punishTypeLabel)
......@@ -102,7 +104,7 @@ class FFPKPunishSelectDetailAlertView: FUSBaseView {
}
descLabel.font = .fus_themeFont(14)
descLabel.textColor = .white
descLabel.textColor = .fus_textColorRich()
descLabel.textAlignment = .left
descLabel.numberOfLines = 0
contentView.addSubview(descLabel)
......@@ -138,7 +140,7 @@ class FFPKPunishSelectDetailAlertView: FUSBaseView {
}
make.append(" ")
make.append(model.typeName)
make.font(.fus_themeFont(14)).textColor(.white)
make.font(.fus_themeFont(14)).textColor(.fus_textColorRich())
})
self.descLabel.text = .fus_versionLocalString("描述") + ":" + (model.describe.removingPercentEncoding ?? "")
}
......
......@@ -741,7 +741,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
[_sexAndAgeBgBtn setBackgroundImage:UIImage.fus_secretBgImg forState:UIControlStateNormal];
[_sexAndAgeBgBtn setTitleEdgeInsets:UIEdgeInsetsMake(0, 10, 0, 0)];
}
[_sexAndAgeBgBtn setTitle:model.age forState:UIControlStateNormal];
[_sexAndAgeBgBtn setTitle:model.age.description forState:UIControlStateNormal];
self.sexAndAgeBgBtn.width = 30;
}
......
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