派对推荐页标签
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
[_searchButton addTarget:self action:@selector(searchButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
_searchButton.layer.masksToBounds = YES;
|
||||
_searchButton.layer.cornerRadius = 16;
|
||||
[_searchButton setTitle:@"搜索房间/昵称/ID" forState:UIControlStateNormal];
|
||||
[_searchButton setTitle:@"搜索用户ID/房间ID" forState:UIControlStateNormal];
|
||||
_searchButton.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[_searchButton setTitleColor:[ThemeColor colorWithHexString:@"#9EB5C5"] forState:UIControlStateNormal];
|
||||
_searchButton.backgroundColor = UIColor.whiteColor;
|
||||
|
@@ -26,6 +26,8 @@
|
||||
@property (nonatomic,strong) UILabel *roomTitleLabel;
|
||||
///房间的标签
|
||||
@property (nonatomic,strong) NetImageView *roomTagImageView;
|
||||
///推荐的标签
|
||||
@property (nonatomic,strong) UIButton *tagButton;
|
||||
///房间榜单的用户
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///第一个人的头像
|
||||
@@ -64,6 +66,7 @@
|
||||
[self.backView addSubview:self.avatarImageView];
|
||||
[self.backView addSubview:self.roomTitleLabel];
|
||||
[self.backView addSubview:self.roomTagImageView];
|
||||
[self.backView addSubview:self.tagButton];
|
||||
[self.backView addSubview:self.stackView];
|
||||
[self.backView addSubview:self.logoImageView];
|
||||
[self.backView addSubview:self.numberLabel];
|
||||
@@ -100,6 +103,11 @@
|
||||
make.top.mas_equalTo(self.roomTitleLabel.mas_bottom).offset(6);
|
||||
}];
|
||||
|
||||
[self.tagButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.left.mas_equalTo(self.roomTagImageView);
|
||||
make.size.mas_equalTo(CGSizeMake(43, 16));
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.roomTitleLabel);
|
||||
make.height.mas_equalTo(20);
|
||||
@@ -192,8 +200,20 @@
|
||||
self.avatarImageView.imageUrl = _roomModel.avatar;
|
||||
self.roomTitleLabel.text = _roomModel.title.length > 0 ? _roomModel.title : @"";
|
||||
self.numberLabel.text = [NSString stringWithFormat:@"%ld", _roomModel.onlineNum];
|
||||
self.roomTagImageView.imageUrl = _roomModel.tagPict;
|
||||
|
||||
///推荐页的标签
|
||||
if (_roomModel.iconContent.length > 0) {
|
||||
self.tagButton.hidden = NO;
|
||||
if (_roomModel.crossPking) {
|
||||
[self.tagButton setTitle:@"PK中" forState:UIControlStateNormal];
|
||||
} else {
|
||||
[self.tagButton setTitle:_roomModel.iconContent forState:UIControlStateNormal];
|
||||
}
|
||||
}else{
|
||||
self.tagButton.hidden = YES;
|
||||
self.roomTagImageView.imageUrl = _roomModel.tagPict;
|
||||
}
|
||||
|
||||
if (_roomModel.micUsers.count > 5) {
|
||||
_roomModel.micUsers = [_roomModel.micUsers subarrayWithRange:NSMakeRange(0, 5)];
|
||||
}
|
||||
@@ -216,6 +236,7 @@
|
||||
_backView = [[UIImageView alloc] init];
|
||||
_backView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_backView.image = [UIImage imageNamed:@"home_party_cell_bg"];
|
||||
_backView.clipsToBounds = YES;
|
||||
}
|
||||
return _backView;
|
||||
}
|
||||
@@ -249,6 +270,18 @@
|
||||
return _roomTagImageView;
|
||||
}
|
||||
|
||||
- (UIButton *)tagButton {
|
||||
if (!_tagButton) {
|
||||
_tagButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_tagButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_tagButton.titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
||||
[_tagButton setBackgroundImage:[UIImage imageNamed:@"home_recommend_tag_bg"] forState:UIControlStateNormal];
|
||||
_tagButton.hidden = YES;
|
||||
_tagButton.userInteractionEnabled = NO;
|
||||
}
|
||||
return _tagButton;
|
||||
}
|
||||
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
|
@@ -187,6 +187,7 @@
|
||||
if (!_divider) {
|
||||
_divider = [[UIView alloc]init];
|
||||
_divider.backgroundColor = [ThemeColor dividerColor];
|
||||
_divider.hidden = YES;
|
||||
}
|
||||
return _divider;
|
||||
}
|
||||
|
Reference in New Issue
Block a user