Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
70447a07
authored
Mar 26, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复uibug
parent
ffe7f37d
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
132 additions
and
101 deletions
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_MVP.imageset/Contents.json
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_MVP.imageset/Live_room_MVP.png
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_MVP.imageset/Live_room_MVP@2x.png
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_MVP.imageset/Live_room_MVP@3x.png
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_close.imageset/Contents.json
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_close.imageset/Live_room_close.png
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_close.imageset/Live_room_close@2x.png
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_close.imageset/Live_room_close@3x.png
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeTicketContributionCell.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/ShowTimeAudienceEntry/FUSLiveShowTimeAudienceEntryMainView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PayRoom/EntryMain/FUSPayRoomEntryMainView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ShowTimePopups/FUSLiveShowTimeMVPConfirmPopView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_MVP.imageset/Contents.json
0 → 100644
View file @
70447a07
{
"images"
:
[
{
"filename"
:
"Live_room_MVP.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Live_room_MVP@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Live_room_MVP@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_MVP.imageset/Live_room_MVP.png
0 → 100644
View file @
70447a07
1.39 KB
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_MVP.imageset/Live_room_MVP@2x.png
0 → 100644
View file @
70447a07
3.09 KB
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_MVP.imageset/Live_room_MVP@3x.png
0 → 100644
View file @
70447a07
3.63 KB
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_close.imageset/Contents.json
0 → 100644
View file @
70447a07
{
"images"
:
[
{
"filename"
:
"Live_room_close.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Live_room_close@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Live_room_close@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_close.imageset/Live_room_close.png
0 → 100644
View file @
70447a07
474 Bytes
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_close.imageset/Live_room_close@2x.png
0 → 100644
View file @
70447a07
880 Bytes
Modules/FUSShowRoomModule/FUSShowRoomModule/FUSShowRoomBundle.bundle/FUSShowRoomAssets.xcassets/Live_room_close.imageset/Live_room_close@3x.png
0 → 100644
View file @
70447a07
1.45 KB
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
View file @
70447a07
...
...
@@ -1013,6 +1013,10 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
[
self
.
liveVC
destroyPlayPictureInPicture
];
}
UIView
*
rootView
=
self
.
liveVC
.
view
?:
[
UIViewController
fus_topViewController
].
view
;
[
self
.
liveVC
fus_setupScrollEnable
:
NO
];
self
.
liveVC
.
backgroundImageView
.
hidden
=
YES
;
[
self
.
currentFunctionView
fus_hideAllFunctionLayers
];
self
.
liveVC
.
liveFunctionView
.
hidden
=
YES
;
__weak
typeof
(
self
)
weakSelf
=
self
;
__block
FUSTicketShowCollectTicketToggleResultModel
*
buyGetDataModel
=
nil
;
NSString
*
channelId
=
[[
errorDict
[
@"channelId"
]
description
]
?:
@""
copy
];
...
...
@@ -1218,6 +1222,11 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
NSString
*
channelId
=
[
dataModel
.
roomData
.
channelId
description
]
?:
@""
;
NSString
*
roundId
=
[
dataModel
.
roomData
.
roundId
description
]
?:
@""
;
[
strongSelf
.
liveVC
fus_setupScrollEnable
:
NO
];
strongSelf
.
liveVC
.
backgroundImageView
.
hidden
=
YES
;
[
strongSelf
.
currentFunctionView
fus_hideAllFunctionLayers
];
strongSelf
.
liveVC
.
liveFunctionView
.
hidden
=
YES
;
__weak
typeof
(
strongSelf
)
weakStrongSelf
=
strongSelf
;
__block
__weak
FUSPayRoomEntryMainView
*
weakEntryView
=
nil
;
FUSPayRoomEntryMainView
*
entryView
=
[
FUSPayRoomEntryMainView
fus_showOnView
:
rootView
viewModel
:
viewModel
actionHandler
:^
(
FUSPayRoomEntryMainViewAction
action
)
{
...
...
@@ -2122,6 +2131,10 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
}
self
.
currentFunctionView
.
hidden
=
NO
;
self
.
liveVC
.
backgroundImageView
.
hidden
=
NO
;
self
.
liveVC
.
liveFunctionView
.
hidden
=
NO
;
[
self
.
currentFunctionView
fus_showAllFunctionLayers
];
[
self
.
liveVC
fus_setupScrollEnable
:
YES
];
FUSLogDebug
(
@"FUSStreamPlayView==== 进入房间成功"
);
if
([
FUSLiveHelper
shareInstance
].
liveRoomType
!=
FUSRoomTypeLinkMic
)
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.m
View file @
70447a07
...
...
@@ -86,8 +86,8 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
@property
(
nonatomic
,
strong
)
UIImageView
*
mvpIconView
;
/// 用户端:MVP 头像
@property
(
nonatomic
,
strong
)
UIImageView
*
mvpAvatarView
;
/// 用户端:MVP 角标
@property
(
nonatomic
,
strong
)
UI
Label
*
mvpTagLabel
;
/// 用户端:MVP 角标
(图标)
@property
(
nonatomic
,
strong
)
UI
ImageView
*
mvpImageView
;
/// 取消集票按钮
@property
(
nonatomic
,
strong
)
UIButton
*
cancelBtn
;
...
...
@@ -275,22 +275,17 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
[
self
.
mvpAvatarView
addGestureRecognizer
:
mvpAvatarTap
];
[
self
.
blurView
.
contentView
addSubview
:
self
.
mvpAvatarView
];
self
.
mvpTagLabel
=
[[
UILabel
alloc
]
init
];
self
.
mvpTagLabel
.
hidden
=
YES
;
self
.
mvpTagLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
mvpTagLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
9
];
self
.
mvpTagLabel
.
textColor
=
UIColor
.
blackColor
;
self
.
mvpTagLabel
.
backgroundColor
=
[
UIColor
colorWithHex
:
@"#52DDE2"
];
self
.
mvpTagLabel
.
text
=
@"MVP"
;
self
.
mvpTagLabel
.
layer
.
cornerRadius
=
7
;
self
.
mvpTagLabel
.
layer
.
masksToBounds
=
YES
;
[
self
.
blurView
.
contentView
addSubview
:
self
.
mvpTagLabel
];
self
.
mvpImageView
=
[[
UIImageView
alloc
]
init
];
self
.
mvpImageView
.
hidden
=
YES
;
self
.
mvpImageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
self
.
mvpImageView
.
image
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"Live_room_MVP"
];
[
self
.
blurView
.
contentView
addSubview
:
self
.
mvpImageView
];
[
self
.
blurView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
edges
.
equalTo
(
self
);
}];
[
self
.
mvp
TagLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
mvp
ImageView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
centerX
.
equalTo
(
self
.
mvpAvatarView
);
make
.
bottom
.
equalTo
(
self
.
mvpAvatarView
).
offset
(
3
);
make
.
size
.
mas_equalTo
(
CGSizeMake
(
34
,
14
));
...
...
@@ -469,18 +464,17 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
}
self
.
mvpIconView
.
hidden
=
YES
;
if
(
mvpUserModel
)
{
self
.
mvpAvatarView
.
hidden
=
NO
;
self
.
mvpTagLabel
.
hidden
=
NO
;
if
(
mvpUserModel
.
face
.
length
>
0
)
{
[
self
.
mvpAvatarView
setWebImageWithSubURLString
:
mvpUserModel
.
face
placeholder
:
nil
];
}
self
.
mvpImageView
.
hidden
=
NO
;
if
(
mvpUserModel
&&
mvpUserModel
.
face
.
length
>
0
)
{
[
self
.
mvpAvatarView
setWebImageWithSubURLString
:
mvpUserModel
.
face
placeholder
:[
UIImage
fus_defaultIcon
]];
}
else
{
self
.
mvpAvatarView
.
hidden
=
YES
;
self
.
mvpTagLabel
.
hidden
=
YES
;
self
.
mvpAvatarView
.
image
=
[
UIImage
fus_defaultIcon
];
}
[
self
.
mvpAvatarView
mas_updateConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
size
.
mas_equalTo
(
self
.
mvpAvatarView
.
hidden
?
CGSizeZero
:
CGSizeMake
(
42
,
42
));
make
.
size
.
mas_equalTo
(
CGSizeMake
(
42
,
42
));
}];
CGFloat
clamped
=
MIN
(
1
.
0
,
MAX
(
0
.
0
,
progress
));
...
...
@@ -902,7 +896,7 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
showBtn
=
(
self
.
cancelHandler
!=
nil
);
[
self
.
cancelBtn
setTitle
:[
NSString
fus_localString
:
@"取消集票"
]
forState
:
UIControlStateNormal
];
}
if
(
self
.
stageStatus
==
2
)
{
if
(
self
.
stageStatus
==
1
||
self
.
stageStatus
==
2
)
{
if
(
self
.
displayMode
==
FUSLiveShowTimeCollectFrostedDisplayModeAnchor
)
{
showBtn
=
NO
;
}
else
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeTicketContributionCell.m
View file @
70447a07
...
...
@@ -16,8 +16,8 @@
UIImageView
*
_faceImageView
;
/// 昵称
UILabel
*
_nicknameLabel
;
/// MVP
标签
(仅 MVP 用户展示)
UI
Label
*
_mvpTagLabel
;
/// MVP
图标
(仅 MVP 用户展示)
UI
ImageView
*
_mvpImageView
;
/// 在线等级
UILabel
*
_onlineLabel
;
/// 性别和年龄按钮
...
...
@@ -57,16 +57,11 @@
_nicknameLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#1F1F1F"
];
[
self
.
contentView
addSubview
:
_nicknameLabel
];
_mvpTagLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectZero
];
_mvpTagLabel
.
hidden
=
YES
;
_mvpTagLabel
.
textAlignment
=
NSTextAlignmentCenter
;
_mvpTagLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
9
];
_mvpTagLabel
.
textColor
=
UIColor
.
blackColor
;
_mvpTagLabel
.
backgroundColor
=
[
UIColor
colorWithHex
:
@"#52DDE2"
];
_mvpTagLabel
.
text
=
@"MVP"
;
_mvpTagLabel
.
layer
.
cornerRadius
=
7
;
_mvpTagLabel
.
layer
.
masksToBounds
=
YES
;
[
self
.
contentView
addSubview
:
_mvpTagLabel
];
_mvpImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectZero
];
_mvpImageView
.
hidden
=
YES
;
_mvpImageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
_mvpImageView
.
image
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"Live_room_MVP"
];
[
self
.
contentView
addSubview
:
_mvpImageView
];
_onlineLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectZero
];
_onlineLabel
.
font
=
[
UIFont
fus_themeFont
:
12
];
...
...
@@ -172,12 +167,11 @@
make
.
right
.
lessThanOrEqualTo
(
_countLabel
.
mas_left
).
offset
(
-
10
);
}];
[
_mvp
TagLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
_firstLoveImageView
.
mas_right
).
offset
(
4
);
make
.
centerY
.
equalTo
(
_
nicknameLabel
.
mas_centerY
);
[
_mvp
ImageView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
centerX
.
equalTo
(
_faceImageView
);
make
.
centerY
.
equalTo
(
_
faceImageView
.
mas_bottom
).
offset
(
-
2
);
make
.
height
.
mas_equalTo
(
14
);
make
.
width
.
mas_equalTo
(
34
);
make
.
right
.
lessThanOrEqualTo
(
_countLabel
.
mas_left
).
offset
(
-
10
);
}];
[
_genderAndAgeBtn
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
...
...
@@ -204,7 +198,7 @@
_faceImageView
.
image
=
nil
;
_nicknameLabel
.
text
=
@""
;
_countLabel
.
text
=
@""
;
_mvp
TagLabel
.
hidden
=
YES
;
_mvp
ImageView
.
hidden
=
YES
;
_vipImageView
.
hidden
=
YES
;
_newImageView
.
hidden
=
YES
;
_firstLoveImageView
.
hidden
=
YES
;
...
...
@@ -269,7 +263,7 @@
}
_onlineLabel
.
hidden
=
NO
;
_mvp
TagLabel
.
hidden
=
!
(
model
.
mvp
==
1
);
_mvp
ImageView
.
hidden
=
!
(
model
.
mvp
==
1
);
[
_onlineLabel
mas_remakeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
_nicknameLabel
.
mas_right
).
offset
(
6
);
...
...
@@ -312,23 +306,8 @@
make
.
right
.
lessThanOrEqualTo
(
_countLabel
.
mas_left
).
offset
(
-
10
);
}];
[
_mvpTagLabel
mas_remakeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
UIView
*
leftView
=
nil
;
if
(
!
_firstLoveImageView
.
hidden
)
{
leftView
=
_firstLoveImageView
;
}
else
if
(
showNew
)
{
leftView
=
_newImageView
;
}
else
if
(
showVip
)
{
leftView
=
_vipImageView
;
}
else
{
leftView
=
_onlineLabel
;
}
make
.
left
.
equalTo
(
leftView
.
mas_right
).
offset
(
4
);
make
.
centerY
.
equalTo
(
_nicknameLabel
.
mas_centerY
);
make
.
height
.
mas_equalTo
(
14
);
make
.
width
.
mas_equalTo
((
model
.
mvp
==
1
)
?
34
:
0
);
make
.
right
.
lessThanOrEqualTo
(
_countLabel
.
mas_left
).
offset
(
-
10
);
}];
// MVP Icon remains below avatar, no need to remake horizontal constraints
_mvpImageView
.
hidden
=
!
(
model
.
mvp
==
1
);
[
self
.
contentView
layoutIfNeeded
];
}
...
...
@@ -341,10 +320,10 @@
_faceImageView
.
image
=
UIImage
.
fus_defaultIcon
;
}
/// 票数与 MVP
标签
受服务端数据影响,统一做兜底,避免异常值导致 UI 抖动
/// 票数与 MVP
图标
受服务端数据影响,统一做兜底,避免异常值导致 UI 抖动
_nicknameLabel
.
text
=
(
nickname
.
length
>
0
?
nickname
:
@""
);
_countLabel
.
text
=
[
NSString
stringWithFormat
:
@"%zd"
,
(
NSInteger
)
MAX
(
0
,
ticketCount
)];
_mvp
TagLabel
.
hidden
=
!
isMVP
;
_mvp
ImageView
.
hidden
=
!
isMVP
;
}
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/ShowTimeAudienceEntry/FUSLiveShowTimeAudienceEntryMainView.m
View file @
70447a07
...
...
@@ -255,7 +255,7 @@ NSString * const FUSLiveShowTimeAudienceEntryTicketOptionTagTextKey = @"tagText"
/// 背景遮罩按钮(用于拦截触摸并支持点击关闭)
@property
(
nonatomic
,
strong
)
UIButton
*
bgBtn
;
/// 右上角关闭按钮
(对齐项目通用关闭样式)
/// 右上角关闭按钮
@property
(
nonatomic
,
strong
)
UIButton
*
closeBtn
;
/// 白色内容卡片容器(承载所有展示内容)
@property
(
nonatomic
,
strong
)
UIView
*
cardView
;
...
...
@@ -478,7 +478,7 @@ NSString * const FUSLiveShowTimeAudienceEntryTicketOptionTagTextKey = @"tagText"
[
self
addSubview
:
self
.
bgBtn
];
self
.
closeBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
closeBtn
setImage
:[
FUSShowRoomCenterBunble
imageNamed
:
@"
live_board
_close"
]
forState
:
UIControlStateNormal
];
[
self
.
closeBtn
setImage
:[
FUSShowRoomCenterBunble
imageNamed
:
@"
Live_room
_close"
]
forState
:
UIControlStateNormal
];
[
self
addSubview
:
self
.
closeBtn
];
self
.
cardView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectZero
];
...
...
@@ -599,7 +599,6 @@ NSString * const FUSLiveShowTimeAudienceEntryTicketOptionTagTextKey = @"tagText"
-
(
void
)
fus_bindActions
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
.
bgBtn
addTarget
:
self
action
:
@selector
(
fus_onTapBackground
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
closeBtn
addTarget
:
self
action
:
@selector
(
fus_onTapClose
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
enterButton
addTarget
:
self
action
:
@selector
(
fus_onTapEnter
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
noticeButton
addTarget
:
self
action
:
@selector
(
fus_onTapNotice
)
forControlEvents
:
UIControlEventTouchUpInside
];
...
...
@@ -633,16 +632,6 @@ NSString * const FUSLiveShowTimeAudienceEntryTicketOptionTagTextKey = @"tagText"
}];
}
-
(
void
)
fus_onTapBackground
{
if
(
!
self
.
dismissWhenTapBackground
)
{
return
;
}
/// 点击背景属于“用户意图关闭”,是否真正关闭交由外部统一控制(便于做强引导/二次确认)
if
(
self
.
actionHandler
)
{
self
.
actionHandler
(
FUSLiveShowTimeAudienceEntryMainViewActionDismiss
,
self
.
selectedOptionIndex
);
}
}
-
(
void
)
fus_onTapClose
{
if
(
self
.
actionHandler
)
{
self
.
actionHandler
(
FUSLiveShowTimeAudienceEntryMainViewActionDismiss
,
self
.
selectedOptionIndex
);
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PayRoom/EntryMain/FUSPayRoomEntryMainView.m
View file @
70447a07
...
...
@@ -46,6 +46,7 @@
@interface
FUSPayRoomEntryMainView
()
@property
(
nonatomic
,
strong
)
UIButton
*
backgroundButton
;
@property
(
nonatomic
,
strong
)
UIButton
*
closeBtn
;
@property
(
nonatomic
,
strong
)
UIView
*
cardView
;
@property
(
nonatomic
,
strong
)
UIView
*
titleBarView
;
...
...
@@ -165,6 +166,10 @@
self
.
backgroundButton
.
backgroundColor
=
UIColor
.
clearColor
;
[
self
addSubview
:
self
.
backgroundButton
];
self
.
closeBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
closeBtn
setImage
:[
FUSShowRoomCenterBunble
imageNamed
:
@"Live_room_close"
]
forState
:
UIControlStateNormal
];
[
self
addSubview
:
self
.
closeBtn
];
// 卡片层:承载内容与操作按钮。
self
.
cardView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectZero
];
self
.
cardView
.
backgroundColor
=
UIColor
.
whiteColor
;
...
...
@@ -243,6 +248,12 @@
make
.
edges
.
equalTo
(
self
);
}];
[
self
.
closeBtn
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
equalTo
(
self
.
mas_safeAreaLayoutGuideTop
).
offset
(
6
);
make
.
right
.
equalTo
(
self
).
offset
(
-
8
);
make
.
width
.
height
.
mas_equalTo
(
44
);
}];
[
self
.
cardView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
center
.
equalTo
(
self
);
make
.
width
.
mas_equalTo
(
285
);
...
...
@@ -280,8 +291,8 @@
[
self
.
accompanyAvatarContainerView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
equalTo
(
self
.
anchorNameLabel
.
mas_bottom
).
offset
(
12
);
make
.
centerX
.
equalTo
(
self
.
cardView
);
make
.
height
.
mas_equalTo
(
18
);
self
.
accompanyAvatarContainerWidthConstraint
=
make
.
width
.
mas_equalTo
(
18
);
make
.
height
.
mas_equalTo
(
30
);
self
.
accompanyAvatarContainerWidthConstraint
=
make
.
width
.
mas_equalTo
(
30
);
}];
[
self
.
accompanyCountLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
...
...
@@ -320,7 +331,8 @@
}
-
(
void
)
fus_bindActions
{
[
self
.
backgroundButton
addTarget
:
self
action
:
@selector
(
fus_onTapBackground
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
backgroundButton
addTarget
:
self
action
:
@selector
(
fus_onTapClose
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
closeBtn
addTarget
:
self
action
:
@selector
(
fus_onTapClose
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
primaryButton
addTarget
:
self
action
:
@selector
(
fus_onTapPrimary
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
trialButton
addTarget
:
self
action
:
@selector
(
fus_onTapTrial
)
forControlEvents
:
UIControlEventTouchUpInside
];
}
...
...
@@ -395,7 +407,7 @@
-
(
void
)
fus_updateAccompanyAvatarsWithFacePaths
:
(
NSArray
<
NSString
*>
*
)
facePaths
{
NSArray
<
NSString
*>
*
safeFacePaths
=
(
facePaths
?:
@[]);
NSUInteger
maxCount
=
8
;
NSUInteger
maxCount
=
10
;
NSUInteger
displayCount
=
MIN
(
maxCount
,
safeFacePaths
.
count
);
if
(
displayCount
==
0
)
{
displayCount
=
1
;
...
...
@@ -404,7 +416,7 @@
while
(
self
.
accompanyAvatarViews
.
count
<
displayCount
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectZero
];
imageView
.
contentMode
=
UIViewContentModeScaleAspectFill
;
imageView
.
layer
.
cornerRadius
=
9
;
imageView
.
layer
.
cornerRadius
=
15
;
imageView
.
layer
.
masksToBounds
=
YES
;
imageView
.
backgroundColor
=
[
UIColor
colorWithHex
:
@"#E6E6E6"
];
[
self
.
accompanyAvatarContainerView
addSubview
:
imageView
];
...
...
@@ -428,17 +440,24 @@
}
else
{
[
imageView
setLiveFaceWebImageWithSubURLString
:
facePath
placeholder
:
UIImage
.
fus_defaultIcon
];
}
// 为了实现错位层叠效果,后添加的视图在最上面
[
self
.
accompanyAvatarContainerView
bringSubviewToFront
:
imageView
];
// 为了和设计图保持一致,给头像加一层白边,让层叠时边界更清晰
imageView
.
layer
.
borderWidth
=
1
.
0
;
imageView
.
layer
.
borderColor
=
UIColor
.
whiteColor
.
CGColor
;
}
CGFloat
size
=
18
;
CGFloat
space
=
6
;
CGFloat
totalW
=
displayCount
*
size
+
(
displayCount
>
0
?
(
displayCount
-
1
)
*
space
:
0
);
CGFloat
size
=
30
;
CGFloat
overlap
=
8
;
// 重叠部分的宽度
CGFloat
visibleWidth
=
size
-
overlap
;
// 每个头像实际增加的宽度
CGFloat
totalW
=
displayCount
>
0
?
(
size
+
(
displayCount
-
1
)
*
visibleWidth
)
:
0
;
[
self
.
accompanyAvatarContainerWidthConstraint
setOffset
:
totalW
];
for
(
NSUInteger
idx
=
0
;
idx
<
displayCount
;
idx
++
)
{
UIImageView
*
imageView
=
self
.
accompanyAvatarViews
[
idx
];
[
imageView
mas_remakeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
accompanyAvatarContainerView
).
offset
(
idx
*
(
size
+
space
)
);
make
.
left
.
equalTo
(
self
.
accompanyAvatarContainerView
).
offset
(
idx
*
visibleWidth
);
make
.
centerY
.
equalTo
(
self
.
accompanyAvatarContainerView
);
make
.
size
.
mas_equalTo
(
CGSizeMake
(
size
,
size
));
}];
...
...
@@ -450,11 +469,7 @@
#pragma mark - Actions
-
(
void
)
fus_onTapBackground
{
if
(
!
self
.
viewModel
.
dismissWhenTapBackground
)
{
return
;
}
-
(
void
)
fus_onTapClose
{
if
(
self
.
actionHandler
)
{
self
.
actionHandler
(
FUSPayRoomEntryMainViewActionDismiss
);
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ShowTimePopups/FUSLiveShowTimeMVPConfirmPopView.m
View file @
70447a07
...
...
@@ -24,8 +24,8 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
@property
(
nonatomic
,
strong
)
UILabel
*
ticketCountLabel
;
/// MVP 头像
@property
(
nonatomic
,
strong
)
UIImageView
*
avatarView
;
/// MVP 标识
标签
@property
(
nonatomic
,
strong
)
UI
Label
*
mvpTagLabel
;
/// MVP 标识
图标
@property
(
nonatomic
,
strong
)
UI
ImageView
*
mvpImageView
;
/// 昵称标签
@property
(
nonatomic
,
strong
)
UILabel
*
nicknameLabel
;
...
...
@@ -106,15 +106,10 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
self
.
avatarView
.
image
=
[
UIImage
fus_defaultIcon
];
[
self
.
contentView
addSubview
:
self
.
avatarView
];
self
.
mvpTagLabel
=
[[
UILabel
alloc
]
init
];
self
.
mvpTagLabel
.
text
=
@"MVP"
;
self
.
mvpTagLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
mvpTagLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
12
];
self
.
mvpTagLabel
.
textColor
=
UIColor
.
blackColor
;
self
.
mvpTagLabel
.
backgroundColor
=
[
UIColor
colorWithHex
:
@"#01D9E0"
];
self
.
mvpTagLabel
.
layer
.
cornerRadius
=
10
;
self
.
mvpTagLabel
.
layer
.
masksToBounds
=
YES
;
[
self
.
contentView
addSubview
:
self
.
mvpTagLabel
];
self
.
mvpImageView
=
[[
UIImageView
alloc
]
init
];
self
.
mvpImageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
self
.
mvpImageView
.
image
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"Live_room_MVP"
];
[
self
.
contentView
addSubview
:
self
.
mvpImageView
];
self
.
nicknameLabel
=
[[
UILabel
alloc
]
init
];
self
.
nicknameLabel
.
textAlignment
=
NSTextAlignmentCenter
;
...
...
@@ -172,16 +167,16 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
make
.
size
.
mas_equalTo
(
CGSizeMake
(
50
,
50
));
}];
[
self
.
mvp
TagLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
mvp
ImageView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
centerX
.
equalTo
(
self
.
avatarView
);
make
.
top
.
equalTo
(
self
.
avatarView
.
mas_bottom
).
offset
(
-
8
);
make
.
size
.
mas_equalTo
(
CGSizeMake
(
54
,
20
));
make
.
size
.
mas_equalTo
(
CGSizeMake
(
42
,
16
));
}];
[
self
.
nicknameLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
contentView
).
offset
(
16
);
make
.
right
.
equalTo
(
self
.
contentView
).
offset
(
-
16
);
make
.
top
.
equalTo
(
self
.
mvp
TagLabel
.
mas_bottom
).
offset
(
6
);
make
.
top
.
equalTo
(
self
.
mvp
ImageView
.
mas_bottom
).
offset
(
6
);
make
.
height
.
mas_equalTo
(
20
);
}];
...
...
@@ -233,7 +228,7 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
}
}
self
.
nicknameLabel
.
text
=
(
decodedNickname
.
length
>
0
?
decodedNickname
:
@""
);
self
.
mvpTagLabel
.
text
=
(
tagText
.
length
>
0
?
tagText
:
@"MVP"
);
// self.mvpImageView.image is fixed as Live_room_MVP, so tagText is ignored here.
}
-
(
void
)
fus_updateTicketCount
:
(
NSInteger
)
ticketCount
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment