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
1961242d
authored
Mar 25, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复些ui bug
parent
2e3afab2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/GiftInteract/FUSLiveGiftInteractAudiencePanelView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/GiftInteract/FUSLiveGiftInteractTaskPanelView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/GiftInteract/FUSLiveGiftInteractAudiencePanelView.m
View file @
1961242d
#import "FUSLiveGiftInteractAudiencePanelView.h"
#import "FUSLiveGiftInteractAudiencePanelView.h"
#import "FUSLiveGiftInteractSettingItemModel.h"
#import "FUSLiveGiftInteractSettingItemModel.h"
#import "CBAutoScrollLabel.h"
@interface
FUSLiveGiftInteractAudiencePanelView
()
@interface
FUSLiveGiftInteractAudiencePanelView
()
/// 顶部标题栏容器
/// 顶部标题栏容器
...
@@ -15,7 +16,7 @@
...
@@ -15,7 +16,7 @@
/// 礼物图标列表(按 items 数量动态增减)
/// 礼物图标列表(按 items 数量动态增减)
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UIImageView
*>
*
giftIconViews
;
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UIImageView
*>
*
giftIconViews
;
/// 礼物数量 label 列表(按 items 数量动态增减)
/// 礼物数量 label 列表(按 items 数量动态增减)
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UI
Label
*>
*
giftCountLabels
;
@property
(
nonatomic
,
strong
)
NSMutableArray
<
CBAutoScroll
Label
*>
*
giftCountLabels
;
/// 当前展示的条目数组
/// 当前展示的条目数组
@property
(
nonatomic
,
copy
)
NSArray
<
FUSLiveGiftInteractSettingItemModel
*>
*
items
;
@property
(
nonatomic
,
copy
)
NSArray
<
FUSLiveGiftInteractSettingItemModel
*>
*
items
;
@end
@end
...
@@ -86,7 +87,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
...
@@ -86,7 +87,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
[
self
.
giftIconViews
removeLastObject
];
[
self
.
giftIconViews
removeLastObject
];
}
}
while
(
self
.
giftCountLabels
.
count
>
targetCount
)
{
while
(
self
.
giftCountLabels
.
count
>
targetCount
)
{
UI
Label
*
label
=
self
.
giftCountLabels
.
lastObject
;
CBAutoScroll
Label
*
label
=
self
.
giftCountLabels
.
lastObject
;
[
label
removeFromSuperview
];
[
label
removeFromSuperview
];
[
self
.
giftCountLabels
removeLastObject
];
[
self
.
giftCountLabels
removeLastObject
];
}
}
...
@@ -108,11 +109,11 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
...
@@ -108,11 +109,11 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
[
self
.
giftIconViews
addObject
:
imgView
];
[
self
.
giftIconViews
addObject
:
imgView
];
}
}
while
(
self
.
giftCountLabels
.
count
<
targetCount
)
{
while
(
self
.
giftCountLabels
.
count
<
targetCount
)
{
UILabel
*
label
=
[[
UI
Label
alloc
]
initWithFrame
:
CGRectZero
];
CBAutoScrollLabel
*
label
=
[[
CBAutoScroll
Label
alloc
]
initWithFrame
:
CGRectZero
];
label
.
font
=
[
UIFont
fus_themeFont
:
11
];
label
.
font
=
[
UIFont
fus_themeFont
:
11
];
label
.
textColor
=
UIColor
.
whiteColor
;
label
.
textColor
=
UIColor
.
whiteColor
;
label
.
textAlignment
=
NSTextAlignmentLeft
;
label
.
textAlignment
=
NSTextAlignmentLeft
;
label
.
numberOfLines
=
1
;
[
label
observeApplicationNotifications
]
;
[
self
addSubview
:
label
];
[
self
addSubview
:
label
];
[
self
.
giftCountLabels
addObject
:
label
];
[
self
.
giftCountLabels
addObject
:
label
];
}
}
...
@@ -139,7 +140,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
...
@@ -139,7 +140,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
[
giftIconView
setImageWithURL
:
url
placeholder
:
placeholder
options
:
0
completion
:
nil
];
[
giftIconView
setImageWithURL
:
url
placeholder
:
placeholder
options
:
0
completion
:
nil
];
}
}
UI
Label
*
countLabel
=
self
.
giftCountLabels
[
i
];
CBAutoScroll
Label
*
countLabel
=
self
.
giftCountLabels
[
i
];
NSInteger
giftNum
=
model
.
giftNum
;
NSInteger
giftNum
=
model
.
giftNum
;
countLabel
.
text
=
(
giftNum
>
0
?
[
NSString
stringWithFormat
:
@"x%ld"
,
(
long
)
giftNum
]
:
@""
);
countLabel
.
text
=
(
giftNum
>
0
?
[
NSString
stringWithFormat
:
@"x%ld"
,
(
long
)
giftNum
]
:
@""
);
}
}
...
@@ -195,7 +196,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
...
@@ -195,7 +196,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
UIImageView
*
iconView
=
self
.
giftIconViews
[
i
];
UIImageView
*
iconView
=
self
.
giftIconViews
[
i
];
iconView
.
frame
=
CGRectMake
(
giftIconX
,
y
+
(
rowHeight
-
giftIconSize
)
*
0
.
5
,
giftIconSize
,
giftIconSize
);
iconView
.
frame
=
CGRectMake
(
giftIconX
,
y
+
(
rowHeight
-
giftIconSize
)
*
0
.
5
,
giftIconSize
,
giftIconSize
);
UI
Label
*
countLabel
=
self
.
giftCountLabels
[
i
];
CBAutoScroll
Label
*
countLabel
=
self
.
giftCountLabels
[
i
];
countLabel
.
frame
=
CGRectMake
(
giftCountX
,
y
,
countW
,
rowHeight
);
countLabel
.
frame
=
CGRectMake
(
giftCountX
,
y
,
countW
,
rowHeight
);
}
}
}
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/GiftInteract/FUSLiveGiftInteractTaskPanelView.m
View file @
1961242d
#import "FUSLiveGiftInteractTaskPanelView.h"
#import "FUSLiveGiftInteractTaskPanelView.h"
#import "FUSLiveGiftInteractSettingItemModel.h"
#import "FUSLiveGiftInteractSettingItemModel.h"
#import "CBAutoScrollLabel.h"
@interface
FUSLiveGiftInteractTaskPanelView
()
@interface
FUSLiveGiftInteractTaskPanelView
()
/// 顶部标题栏
/// 顶部标题栏
...
@@ -17,7 +18,7 @@
...
@@ -17,7 +18,7 @@
/// 昵称 label 列表(按 items 数量动态增减)
/// 昵称 label 列表(按 items 数量动态增减)
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UILabel
*>
*
nicknameLabels
;
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UILabel
*>
*
nicknameLabels
;
/// 任务文案 label 列表(按 items 数量动态增减)
/// 任务文案 label 列表(按 items 数量动态增减)
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UI
Label
*>
*
taskLabels
;
@property
(
nonatomic
,
strong
)
NSMutableArray
<
CBAutoScroll
Label
*>
*
taskLabels
;
/// 右侧“消失”按钮列表(按 taskTexts 数量动态增减)
/// 右侧“消失”按钮列表(按 taskTexts 数量动态增减)
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UIButton
*>
*
doneButtons
;
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UIButton
*>
*
doneButtons
;
@end
@end
...
@@ -89,7 +90,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
...
@@ -89,7 +90,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
[
self
.
nicknameLabels
removeLastObject
];
[
self
.
nicknameLabels
removeLastObject
];
}
}
while
(
self
.
taskLabels
.
count
>
targetCount
)
{
while
(
self
.
taskLabels
.
count
>
targetCount
)
{
UI
Label
*
label
=
self
.
taskLabels
.
lastObject
;
CBAutoScroll
Label
*
label
=
self
.
taskLabels
.
lastObject
;
[
label
removeFromSuperview
];
[
label
removeFromSuperview
];
[
self
.
taskLabels
removeLastObject
];
[
self
.
taskLabels
removeLastObject
];
}
}
...
@@ -116,12 +117,11 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
...
@@ -116,12 +117,11 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
[
self
.
nicknameLabels
addObject
:
label
];
[
self
.
nicknameLabels
addObject
:
label
];
}
}
while
(
self
.
taskLabels
.
count
<
targetCount
)
{
while
(
self
.
taskLabels
.
count
<
targetCount
)
{
UILabel
*
label
=
[[
UI
Label
alloc
]
initWithFrame
:
CGRectZero
];
CBAutoScrollLabel
*
label
=
[[
CBAutoScroll
Label
alloc
]
initWithFrame
:
CGRectZero
];
label
.
font
=
[
UIFont
fus_themeFont
:
10
];
label
.
font
=
[
UIFont
fus_themeFont
:
10
];
label
.
textColor
=
UIColor
.
whiteColor
;
label
.
textColor
=
UIColor
.
whiteColor
;
label
.
textAlignment
=
NSTextAlignmentRight
;
label
.
textAlignment
=
NSTextAlignmentRight
;
label
.
lineBreakMode
=
NSLineBreakByTruncatingTail
;
[
label
observeApplicationNotifications
]
;
[
self
addSubview
:
label
];
[
self
addSubview
:
label
];
[
self
.
taskLabels
addObject
:
label
];
[
self
.
taskLabels
addObject
:
label
];
}
}
...
@@ -148,9 +148,9 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
...
@@ -148,9 +148,9 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
NSString
*
nickname
=
model
.
userNickname
?:
@""
;
NSString
*
nickname
=
model
.
userNickname
?:
@""
;
nicknameLabel
.
text
=
fus_substringComposedToLength
(
nickname
,
4
);
nicknameLabel
.
text
=
fus_substringComposedToLength
(
nickname
,
4
);
UI
Label
*
taskLabel
=
self
.
taskLabels
[
i
];
CBAutoScroll
Label
*
taskLabel
=
self
.
taskLabels
[
i
];
NSString
*
task
=
model
.
name
?:
@""
;
NSString
*
task
=
model
.
name
?:
@""
;
taskLabel
.
text
=
fus_substringComposedToLength
(
task
,
6
)
;
taskLabel
.
text
=
task
;
UIButton
*
btn
=
self
.
doneButtons
[
i
];
UIButton
*
btn
=
self
.
doneButtons
[
i
];
btn
.
tag
=
i
;
btn
.
tag
=
i
;
...
@@ -211,7 +211,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
...
@@ -211,7 +211,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
UILabel
*
nicknameLabel
=
self
.
nicknameLabels
[
i
];
UILabel
*
nicknameLabel
=
self
.
nicknameLabels
[
i
];
nicknameLabel
.
frame
=
CGRectMake
(
nicknameX
,
y
,
nicknameW
,
rowHeight
);
nicknameLabel
.
frame
=
CGRectMake
(
nicknameX
,
y
,
nicknameW
,
rowHeight
);
UI
Label
*
taskLabel
=
self
.
taskLabels
[
i
];
CBAutoScroll
Label
*
taskLabel
=
self
.
taskLabels
[
i
];
taskLabel
.
frame
=
CGRectMake
(
taskX
,
y
,
taskW
,
rowHeight
);
taskLabel
.
frame
=
CGRectMake
(
taskX
,
y
,
taskW
,
rowHeight
);
UIButton
*
btn
=
self
.
doneButtons
[
i
];
UIButton
*
btn
=
self
.
doneButtons
[
i
];
...
...
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