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
54bd19f8
authored
Jul 16, 2024
by
ludi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/UI修改版本' of
http://git.yabolive.net:88/pidan/FuSiLive
into feature/UI修改版本
parents
5c3a9db3
1b6d0878
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
91 additions
and
26 deletions
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Categories/NSString/NSString+Extend.m
FuSiLive/Classes/InstantMessaging/View/ToolViews/VideoChat/FunctionViews/FUSVideoChatUserInfoView.m
FuSiLive/Classes/NewLive/Main/Other/FormatContent/FUSFormatContentHelper.m
FuSiLive/Classes/NewLive/Main/Other/FunctionViewHelper/FUSLiveChatDataSourceHelper.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/AudienceListView/ContributeList/FUSContributeCellTableViewCell.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/AudienceListView/ContributeList/FUSContributeListView.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/AudienceListView/UserList/FUSAudienceListView.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/AudienceListView/UserList/FUSAudienceTableViewCell.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/HeadView/FUSLiveHeadPusherView.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/HeadView/LiveUserListView/FUSLiveHeaderUserListView.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/LiveGame/FUSLiveGameListView.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/Popular/Rank/FUSPopularListView.xib
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Categories/NSString/NSString+Extend.m
View file @
54bd19f8
...
...
@@ -170,6 +170,10 @@
if
([
result
containsString
:
@"FIREFLY"
])
{
result
=
[
result
stringByReplacingOccurrencesOfString
:
@"FIREFLY"
withString
:
@"FUSI"
];
}
if
([
result
containsString
:
@"Footseen"
])
{
result
=
[
result
stringByReplacingOccurrencesOfString
:
@"Footseen"
withString
:
@"fusi"
];
}
return
result
;
}
...
...
FuSiLive/Classes/InstantMessaging/View/ToolViews/VideoChat/FunctionViews/FUSVideoChatUserInfoView.m
View file @
54bd19f8
...
...
@@ -16,6 +16,7 @@
#import "FUSReportViewController.h"
// View
#import "FUSLiveOutlineLabel.h"
#import "FUSControllerPushHelper.h"
#define INFO_VIEW_HEIGHT 338
#define BUTTOM_VIEW_HEIGHT 64
...
...
@@ -38,6 +39,8 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
@property
(
nonatomic
,
strong
)
UIButton
*
faceBtn
;
// 富豪等级view
@property
(
nonatomic
,
strong
)
UIImageView
*
richImageView
;
/// vip 点击事件
@property
(
nonatomic
,
strong
)
UIButton
*
vipBtn
;
// 举报按钮
@property
(
nonatomic
,
strong
)
UIButton
*
reportBtn
;
// 昵称
...
...
@@ -466,6 +469,10 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
_richImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
28
,
14
)];
_richImageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
[
self
.
bgView
addSubview
:
_richImageView
];
self
.
vipBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
vipBtn
addTarget
:
self
action
:
@selector
(
fus_jumpToVipPage
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
bgView
addSubview
:
self
.
vipBtn
];
}
-
(
void
)
fus_initSexAndAgeBgView
{
...
...
@@ -682,7 +689,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
self
.
levLabel
.
centerY
=
self
.
nickNameLabel
.
centerY
;
self
.
richImageView
.
centerY
=
self
.
levLabel
.
centerY
;
self
.
vipBtn
.
frame
=
self
.
richImageView
.
frame
;
/// ***********
/// id行 :id + 性别
...
...
@@ -702,7 +709,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
[
_sexAndAgeBgBtn
setBackgroundImage
:
nil
forState
:
UIControlStateNormal
];
[
_sexAndAgeBgBtn
setImage
:
nil
forState
:
UIControlStateNormal
];
[
_sexAndAgeBgBtn
setTitle
:
nil
forState
:
UIControlStateNormal
];
if
(
[
NSString
isNull
:
model
.
constellation
]
)
{
if
(
model
.
age
.
integerValue
<=
0
)
{
if
(
model
.
sex
.
integerValue
==
0
)
{
[
_sexAndAgeBgBtn
setImage
:[[
UIImage
imageNamed
:
@"fireFly_my_zone_sex_famale_no_age"
]
fusrtl_imageFlippedForRightToLeftLayoutDirection
]
forState
:
UIControlStateNormal
];
}
else
if
(
model
.
sex
.
integerValue
==
1
)
{
...
...
@@ -710,6 +717,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
}
else
if
(
model
.
sex
.
integerValue
==
-
1
)
{
[
_sexAndAgeBgBtn
setImage
:[[
UIImage
imageNamed
:
@"fireFly_my_zone_sex_secret_no_age"
]
fusrtl_imageFlippedForRightToLeftLayoutDirection
]
forState
:
UIControlStateNormal
];
}
self
.
sexAndAgeBgBtn
.
width
=
14
;
}
else
{
if
(
model
.
sex
.
integerValue
==
0
)
{
NSString
*
str
=
[
FUSRTL
RTLImageName
:
@"video_chat_userinfo_sex_female_bg"
];
...
...
@@ -723,6 +731,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
[
_sexAndAgeBgBtn
setTitleEdgeInsets
:
UIEdgeInsetsMake
(
0
,
10
,
0
,
0
)];
}
[
_sexAndAgeBgBtn
setTitle
:
model
.
age
forState
:
UIControlStateNormal
];
self
.
sexAndAgeBgBtn
.
width
=
30
;
}
idLineWidth
+=
nickLineItemSpace
+
_sexAndAgeBgBtn
.
width
;
...
...
@@ -1055,6 +1064,10 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
#pragma mark 按钮点击事件
-
(
void
)
fus_jumpToVipPage
{
[[
UIViewController
fus_topViewController
].
navigationController
fus_pushToBuyVIPControllerWithAnimate
:
YES
];
}
-
(
void
)
fus_onClickChatWithUser
{
[
self
fus_dismissUserInfoViewWithAnimate
:
YES
];
if
(
self
.
didClickUserInfoViewBtnBlock
)
{
...
...
FuSiLive/Classes/NewLive/Main/Other/FormatContent/FUSFormatContentHelper.m
View file @
54bd19f8
...
...
@@ -397,9 +397,9 @@
if
(
level
<=
0
)
{
continue
;
}
else
if
(
level
>
0
&&
level
<=
30
)
{
content
=
[
content
stringByReplacingCharactersInRange
:
result
.
range
withString
:
@"
<img src=https://big.bgp.ourpow.com/comm/userlevel/fusi/vip.png />
"
];
content
=
[
content
stringByReplacingCharactersInRange
:
result
.
range
withString
:
@"
<img src=https://big.bgp.ourpow.com/comm/userlevel/fusi/vip.png />
"
];
}
else
{
content
=
[
content
stringByReplacingCharactersInRange
:
result
.
range
withString
:
@"
<img src=https://big.bgp.ourpow.com/comm/userlevel/fusi/svip.png />
"
];
content
=
[
content
stringByReplacingCharactersInRange
:
result
.
range
withString
:
@"
<img src=https://big.bgp.ourpow.com/comm/userlevel/fusi/svip.png />
"
];
}
}
}
...
...
FuSiLive/Classes/NewLive/Main/Other/FunctionViewHelper/FUSLiveChatDataSourceHelper.m
View file @
54bd19f8
...
...
@@ -764,12 +764,8 @@
}
}
CGFloat
imageH
=
LEVEL_IMAGE_HEIGHT
;
CGFloat
imageW
=
LEVEL_IMAGE_WIDTH
;
if
(
model
.
isHide
.
boolValue
||
model
.
danmu
.
boolValue
)
{
imageH
=
LEVEL_IMAGE_HEIGHT
*
0
.
8
;
imageW
=
LEVEL_IMAGE_WIDTH
*
0
.
8
;
}
CGFloat
imageH
=
14
;
CGFloat
imageW
=
0
;
dispatch_async
(
dispatch_get_global_queue
(
0
,
0
),
^
{
...
...
@@ -864,8 +860,9 @@
levBtn
.
width
=
20
;
}
NSAttributedString
*
levAttr
=
[
NSAttributedString
attachmentStringWithContent
:
levBtn
contentMode
:
UIViewContentModeScaleAspectFit
attachmentSize
:
levBtn
.
size
alignToFont
:
[
UIFont
fus_themeFont
:
self
.
fontSize
]
alignment
:
YYTextVerticalAlignmentCenter
];
[
attr
insertString
:
@" "
atIndex
:
0
];
[
attr
insertAttributedString
:
levAttr
atIndex
:
0
];
[
attr
appendString
:
@" "
];
}
// 容错
...
...
@@ -887,7 +884,9 @@
CGFloat
imageW
=
levelImageHeight
/
levelImage
.
size
.
height
*
levelImage
.
size
.
width
;
NSAttributedString
*
levelAttr
=
[
NSAttributedString
attachmentStringWithContent
:
levelImage
contentMode
:
UIViewContentModeScaleAspectFit
attachmentSize
:
CGSizeMake
(
imageW
,
imageH
)
alignToFont
:
FUS_LIVE_FONT
(
fontSize
)
alignment
:
YYTextVerticalAlignmentCenter
];
// 让VIP图标图标往下偏移
[
attr
appendString
:
@" "
];
[
attr
appendAttributedString
:
levelAttr
];
[
attr
appendString
:
@" "
];
}
// 有等级 进行添加
// FUSLevelDataModel *levelModel = [self.levelDict objectForKey:model.level];
...
...
@@ -980,7 +979,7 @@
// 3.2.0 添加首冲标识
if
([
model
.
privilege
[
@"firstChargePower"
]
integerValue
]
==
1
)
{
UIImageView
*
firstChargeImageView
=
[[
UIImageView
alloc
]
initWithImage
:[
UIImage
imageNamed
:
@"live_first_love_img"
]];
firstChargeImageView
.
frame
=
CGRectMake
(
0
,
0
,
35
,
1
3
);
firstChargeImageView
.
frame
=
CGRectMake
(
0
,
0
,
35
,
1
4
);
firstChargeImageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
NSAttributedString
*
firstChargeAttr
=
[
NSAttributedString
attachmentStringWithContent
:
firstChargeImageView
contentMode
:
UIViewContentModeScaleAspectFit
attachmentSize
:
firstChargeImageView
.
size
alignToFont
:
[
UIFont
fus_themeFont
:
fontSize
]
alignment
:
YYTextVerticalAlignmentCenter
];
...
...
@@ -1337,7 +1336,7 @@
dispatch_async
(
dispatch_get_global_queue
(
0
,
0
),
^
{
__weak
typeof
(
self
)
weakSelf
=
self
;
CGSize
imageSize
=
CGSizeMake
(
45
,
20
);
CGSize
imageSize
=
CGSizeMake
(
45
,
14
);
NSMutableAttributedString
*
bulletAttr
=
[
self
createContentAttributedStringWithModel
:
message
imageSize
:
imageSize
fontSize
:
14
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/AudienceListView/ContributeList/FUSContributeCellTableViewCell.m
View file @
54bd19f8
...
...
@@ -6,6 +6,7 @@
//
#import "FUSContributeCellTableViewCell.h"
#import "FUSControllerPushHelper.h"
@interface
FUSContributeCellTableViewCell
()
...
...
@@ -24,6 +25,9 @@
/// vip
@property
(
nonatomic
,
strong
)
UIImageView
*
vipImageView
;
/// vip 点击事件
@property
(
nonatomic
,
strong
)
UIButton
*
vipBtn
;
/// 在线等级
@property
(
nonatomic
,
strong
)
UILabel
*
onlineLabel
;
...
...
@@ -53,6 +57,7 @@
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
self
.
backgroundColor
=
[
UIColor
fus_appBGColor
];
self
.
selectedBackgroundView
=
[[
UIView
alloc
]
init
];
self
.
selectedBackgroundView
.
backgroundColor
=
[
UIColor
clearColor
];
[
self
fus_initViews
];
...
...
@@ -89,6 +94,10 @@
self
.
vipImageView
.
contentMode
=
UIViewContentModeScaleToFill
;
[
self
.
contentView
addSubview
:
self
.
vipImageView
];
self
.
vipBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
vipBtn
addTarget
:
self
action
:
@selector
(
fus_jumpToVipPage
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
contentView
addSubview
:
self
.
vipBtn
];
self
.
firstLoveImageView
=
[[
UIImageView
alloc
]
init
];
self
.
firstLoveImageView
.
contentMode
=
UIViewContentModeScaleToFill
;
self
.
firstLoveImageView
.
image
=
[
UIImage
imageNamed
:
@"live_first_love_img"
];
...
...
@@ -108,7 +117,7 @@
self
.
genderAndAgeBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeFont
:
9
];
self
.
genderAndAgeBtn
.
layer
.
borderColor
=
[
UIColor
colorWithHex
:
@"#D6D6D7"
].
CGColor
;
self
.
genderAndAgeBtn
.
layer
.
borderWidth
=
0
.
5
;
self
.
genderAndAgeBtn
.
layer
.
cornerRadius
=
9
;
self
.
genderAndAgeBtn
.
layer
.
cornerRadius
=
7
;
self
.
genderAndAgeBtn
.
layer
.
masksToBounds
=
YES
;
[
self
.
contentView
addSubview
:
self
.
genderAndAgeBtn
];
...
...
@@ -161,6 +170,10 @@
make
.
left
.
equalTo
(
self
.
onlineLabel
.
mas_right
).
offset
(
4
);
}];
[
self
.
vipBtn
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
edges
.
mas_equalTo
(
self
.
vipImageView
);
}];
[
self
.
firstLoveImageView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
width
.
mas_equalTo
(
32
);
make
.
height
.
mas_equalTo
(
11
);
...
...
@@ -320,4 +333,8 @@
}
}
-
(
void
)
fus_jumpToVipPage
{
[[
UIViewController
fus_topViewController
].
navigationController
fus_pushToBuyVIPControllerWithAnimate
:
YES
];
}
@end
FuSiLive/Classes/NewLive/Main/View/FunctionView/AudienceListView/ContributeList/FUSContributeListView.m
View file @
54bd19f8
...
...
@@ -28,6 +28,7 @@
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
self
.
bounds
style
:
UITableViewStylePlain
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
self
.
tableView
.
backgroundColor
=
[
UIColor
fus_appBGColor
];
self
.
tableView
.
contentInset
=
UIEdgeInsetsMake
(
0
,
0
,
74
,
0
);
[
self
.
tableView
registerClass
:[
FUSContributeCellTableViewCell
class
]
forCellReuseIdentifier
:[
FUSContributeCellTableViewCell
cellIdentifer
]];
self
.
tableView
.
rowHeight
=
60
;
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/AudienceListView/UserList/FUSAudienceListView.m
View file @
54bd19f8
...
...
@@ -46,6 +46,7 @@
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
self
.
bounds
style
:
UITableViewStylePlain
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
self
.
tableView
.
backgroundColor
=
[
UIColor
fus_appBGColor
];
self
.
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
[
self
.
tableView
registerClass
:[
FUSAudienceTableViewCell
class
]
forCellReuseIdentifier
:[
FUSAudienceTableViewCell
cellIdentifer
]];
self
.
tableView
.
rowHeight
=
60
;
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/AudienceListView/UserList/FUSAudienceTableViewCell.m
View file @
54bd19f8
...
...
@@ -6,6 +6,7 @@
//
#import "FUSAudienceTableViewCell.h"
#import "FUSControllerPushHelper.h"
#import <Masonry/Masonry.h>
@interface
FUSAudienceTableViewCell
()
...
...
@@ -19,6 +20,9 @@
/// vip
@property
(
nonatomic
,
strong
)
UIImageView
*
vipImageView
;
/// vip 点击事件
@property
(
nonatomic
,
strong
)
UIButton
*
vipBtn
;
/// 在线等级
@property
(
nonatomic
,
strong
)
UILabel
*
onlineLabel
;
...
...
@@ -43,6 +47,7 @@
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
self
.
backgroundColor
=
[
UIColor
fus_appBGColor
];
self
.
selectedBackgroundView
=
[[
UIView
alloc
]
init
];
self
.
selectedBackgroundView
.
backgroundColor
=
[
UIColor
clearColor
];
[
self
fus_initViews
];
...
...
@@ -69,6 +74,10 @@
self
.
vipImageView
.
contentMode
=
UIViewContentModeScaleToFill
;
[
self
.
contentView
addSubview
:
self
.
vipImageView
];
self
.
vipBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
vipBtn
addTarget
:
self
action
:
@selector
(
fus_jumpToVipPage
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
contentView
addSubview
:
self
.
vipBtn
];
self
.
firstLoveImageView
=
[[
UIImageView
alloc
]
init
];
self
.
firstLoveImageView
.
contentMode
=
UIViewContentModeScaleToFill
;
self
.
firstLoveImageView
.
image
=
[
UIImage
imageNamed
:
@"live_first_love_img"
];
...
...
@@ -88,7 +97,7 @@
self
.
genderAndAgeBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeFont
:
9
];
self
.
genderAndAgeBtn
.
layer
.
borderColor
=
[
UIColor
colorWithHex
:
@"#D6D6D7"
].
CGColor
;
self
.
genderAndAgeBtn
.
layer
.
borderWidth
=
0
.
5
;
self
.
genderAndAgeBtn
.
layer
.
cornerRadius
=
9
;
self
.
genderAndAgeBtn
.
layer
.
cornerRadius
=
7
;
self
.
genderAndAgeBtn
.
layer
.
masksToBounds
=
YES
;
[
self
.
contentView
addSubview
:
self
.
genderAndAgeBtn
];
}
...
...
@@ -121,6 +130,10 @@
make
.
left
.
equalTo
(
self
.
onlineLabel
.
mas_right
).
offset
(
4
);
}];
[
self
.
vipBtn
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
edges
.
mas_equalTo
(
self
.
vipImageView
);
}];
[
self
.
firstLoveImageView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
width
.
mas_equalTo
(
32
);
make
.
height
.
mas_equalTo
(
11
);
...
...
@@ -260,4 +273,8 @@
}
}
-
(
void
)
fus_jumpToVipPage
{
[[
UIViewController
fus_topViewController
].
navigationController
fus_pushToBuyVIPControllerWithAnimate
:
YES
];
}
@end
FuSiLive/Classes/NewLive/Main/View/FunctionView/HeadView/FUSLiveHeadPusherView.m
View file @
54bd19f8
...
...
@@ -168,12 +168,12 @@
CGFloat
height
=
_portraitView
.
height
*
1
.
6
;
// 装 collectionView 的 BGView
_userCollectionBGView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
CGRectGetMaxX
(
_portraitView
.
frame
)
+
2
,
CGRectGetMaxY
(
_portraitView
.
frame
)
-
height
,
self
.
width
-
CGRectGetMaxX
(
_portraitView
.
frame
)
-
8
,
height
+
10
)];
_userCollectionBGView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
CGRectGetMaxX
(
_portraitView
.
frame
)
+
2
,
CGRectGetMaxY
(
_portraitView
.
frame
)
-
height
,
self
.
width
-
CGRectGetMaxX
(
_portraitView
.
frame
)
-
8
,
height
)];
_userCollectionBGView
.
backgroundColor
=
[
UIColor
clearColor
];
_userCollectionBGView
.
clipsToBounds
=
YES
;
[
self
addSubview
:
_userCollectionBGView
];
self
.
userListView
=
[[
FUSLiveHeaderUserListView
alloc
]
initWithFrame
:
_userCollectionBGView
.
bounds
];
self
.
userListView
=
[[
FUSLiveHeaderUserListView
alloc
]
initWithFrame
:
_userCollectionBGView
.
bounds
];
[
_userCollectionBGView
addSubview
:
self
.
userListView
];
__weak
typeof
(
self
)
weakSelf
=
self
;
[
_userListView
setUserClickHandler
:
^
(
FUSOnlineUserModel
*
model
)
{
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/HeadView/LiveUserListView/FUSLiveHeaderUserListView.m
View file @
54bd19f8
...
...
@@ -56,13 +56,18 @@ typedef enum : NSUInteger {
[
super
setFrame
:
frame
];
_userCollectionView
.
frame
=
self
.
bounds
;
CGFloat
width
=
floor
((
self
.
width
)
/
6
.
0
)
;
CGFloat
width
=
self
.
height
*
0
.
6
;
if
(
self
.
userItemSize
.
width
!=
width
)
{
_userItemSize
=
CGSizeMake
(
floor
(
width
),
self
.
height
);
_flowLayout
.
itemSize
=
_userItemSize
;
[
_userCollectionView
reloadData
];
}
_userCollectionView
.
width
=
width
*
5
;
// 要显示整数个
CGFloat
collectionViewWidth
=
width
*
5
;
if
(
collectionViewWidth
>
self
.
width
-
width
)
{
collectionViewWidth
=
width
*
4
;
}
self
.
userCollectionView
.
width
=
collectionViewWidth
;
CGFloat
userCountBtnWidth
=
self
.
userItemSize
.
width
-
4
;
self
.
userCountBtn
.
size
=
CGSizeMake
(
userCountBtnWidth
,
userCountBtnWidth
);
...
...
@@ -118,7 +123,7 @@ typedef enum : NSUInteger {
_flowLayout
=
[[
UICollectionViewFlowLayout
alloc
]
init
];
if
(
CGSizeEqualToSize
(
_userItemSize
,
CGSizeZero
))
{
CGFloat
width
=
(
self
.
width
)
/
6
.
0
;
CGFloat
width
=
self
.
height
*
0
.
6
;
_userItemSize
=
CGSizeMake
(
floor
(
width
),
self
.
height
);
}
_flowLayout
.
itemSize
=
_userItemSize
;
...
...
@@ -127,8 +132,15 @@ typedef enum : NSUInteger {
_flowLayout
.
minimumInteritemSpacing
=
0
;
_flowLayout
.
scrollDirection
=
UICollectionViewScrollDirectionHorizontal
;
// 要显示整数个
CGFloat
collectionViewWidth
=
_userItemSize
.
width
*
5
;
if
(
collectionViewWidth
>
self
.
width
-
_userItemSize
.
width
)
{
collectionViewWidth
=
_userItemSize
.
width
*
4
;
}
CGRect
frame
=
self
.
bounds
;
frame
.
size
.
width
=
_userItemSize
.
width
*
5
;
frame
.
size
.
width
=
collectionViewWidth
;
_userCollectionView
=
[[
UICollectionView
alloc
]
initWithFrame
:
frame
collectionViewLayout
:
_flowLayout
];
_userCollectionView
.
showsHorizontalScrollIndicator
=
NO
;
_userCollectionView
.
scrollEnabled
=
NO
;
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/LiveGame/FUSLiveGameListView.m
View file @
54bd19f8
...
...
@@ -56,6 +56,7 @@
layout
.
itemSize
=
CGSizeMake
(
UIView
.
fus_screenW
/
4
.
0
,
98
);
self
.
collectionView
=
[[
UICollectionView
alloc
]
initWithFrame
:
self
.
contentView
.
bounds
collectionViewLayout
:
layout
];
self
.
collectionView
.
backgroundColor
=
[
UIColor
fus_appBGColor
];
self
.
collectionView
.
delegate
=
self
;
self
.
collectionView
.
dataSource
=
self
;
[
self
.
collectionView
registerClass
:[
FUSLiveGameCollectionViewCell
class
]
forCellWithReuseIdentifier
:[
FUSLiveGameCollectionViewCell
cellIdentifer
]];
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/Popular/Rank/FUSPopularListView.xib
View file @
54bd19f8
...
...
@@ -45,8 +45,8 @@
<color
key=
"textColor"
red=
"0.13333333333333333"
green=
"0.13333333333333333"
blue=
"0.13333333333333333"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
Hot
Ranking"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"CPj-W5-p8C"
>
<rect
key=
"frame"
x=
"78"
y=
"17"
width=
"
64
.5"
height=
"15.5"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
Popularity
Ranking"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"CPj-W5-p8C"
>
<rect
key=
"frame"
x=
"78"
y=
"17"
width=
"
98
.5"
height=
"15.5"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Medium"
family=
"PingFang SC"
pointSize=
"11"
/>
<color
key=
"textColor"
red=
"0.52156862745098043"
green=
"0.52156862745098043"
blue=
"0.52156862745098043"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -129,7 +129,7 @@
</userDefinedRuntimeAttributes>
</view>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"live_popular_hot"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Noo-0c-BBA"
>
<rect
key=
"frame"
x=
"98.5"
y=
"40"
width=
"12
8"
height=
"128
"
/>
<rect
key=
"frame"
x=
"98.5"
y=
"40"
width=
"12
.5"
height=
"12.5
"
/>
<color
key=
"tintColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"Noo-0c-BBA"
secondAttribute=
"height"
multiplier=
"1:1"
id=
"Y6U-hc-qYS"
/>
...
...
@@ -142,7 +142,7 @@
</connections>
</button>
<label
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"0"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"BgM-jW-rQL"
customClass=
"FUSLabel"
>
<rect
key=
"frame"
x=
"
231.5
"
y=
"39"
width=
"7.5"
height=
"17"
/>
<rect
key=
"frame"
x=
"
116
"
y=
"39"
width=
"7.5"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"12"
/>
<color
key=
"textColor"
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -229,6 +229,6 @@
</objects>
<resources>
<image
name=
"common_help_icon"
width=
"17.5"
height=
"17.5"
/>
<image
name=
"live_popular_hot"
width=
"12
8"
height=
"128
"
/>
<image
name=
"live_popular_hot"
width=
"12
.5"
height=
"12.5
"
/>
</resources>
</document>
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