派对推荐标签修改

This commit is contained in:
chenshuanglin
2023-03-21 15:12:49 +08:00
parent 7ba4fbd7b8
commit 71d8e12b94
8 changed files with 62 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "home_party_recommand_tag_long@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "home_party_recommand_tag_long@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "home_party_recommand_tag_short@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "home_party_recommand_tag_short@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -105,7 +105,8 @@
[self.tagButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.mas_equalTo(self.roomTagImageView);
make.size.mas_equalTo(CGSizeMake(43, 16));
make.width.mas_equalTo(53);
make.height.mas_equalTo(16);
}];
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -206,8 +207,23 @@
self.tagButton.hidden = NO;
if (_roomModel.crossPking) {
[self.tagButton setTitle:@"PK中" forState:UIControlStateNormal];
[self.tagButton setBackgroundImage:[UIImage imageNamed:@"home_party_recommand_tag_short"] forState:UIControlStateNormal];
[self.tagButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(38);
}];
} else {
[self.tagButton setTitle:_roomModel.iconContent forState:UIControlStateNormal];
if (_roomModel.iconContent.length <= 2) {
[self.tagButton setBackgroundImage:[UIImage imageNamed:@"home_party_recommand_tag_short"] forState:UIControlStateNormal];
[self.tagButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(38);
}];
}else{
[self.tagButton setBackgroundImage:[UIImage imageNamed:@"home_party_recommand_tag_long"] forState:UIControlStateNormal];
[self.tagButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(53);
}];
}
}
}else{
self.tagButton.hidden = YES;
@@ -275,7 +291,6 @@
_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;
}

View File

@@ -115,7 +115,7 @@
- (void)initSubViewConstraints {
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(self.view);
make.top.mas_equalTo(8);
make.top.mas_equalTo(6);
}];
}