派对推荐标签修改
This commit is contained in:
22
xplan-ios/Assets.xcassets/Home/home_party_recommand_tag_long.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Home/home_party_recommand_tag_long.imageset/Contents.json
vendored
Normal 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 |
22
xplan-ios/Assets.xcassets/Home/home_party_recommand_tag_short.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Home/home_party_recommand_tag_short.imageset/Contents.json
vendored
Normal 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 |
@@ -105,7 +105,8 @@
|
|||||||
|
|
||||||
[self.tagButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.tagButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.top.left.mas_equalTo(self.roomTagImageView);
|
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) {
|
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
@@ -206,8 +207,23 @@
|
|||||||
self.tagButton.hidden = NO;
|
self.tagButton.hidden = NO;
|
||||||
if (_roomModel.crossPking) {
|
if (_roomModel.crossPking) {
|
||||||
[self.tagButton setTitle:@"PK中" forState:UIControlStateNormal];
|
[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 {
|
} else {
|
||||||
[self.tagButton setTitle:_roomModel.iconContent forState:UIControlStateNormal];
|
[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{
|
}else{
|
||||||
self.tagButton.hidden = YES;
|
self.tagButton.hidden = YES;
|
||||||
@@ -275,7 +291,6 @@
|
|||||||
_tagButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
_tagButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
[_tagButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
[_tagButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
_tagButton.titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
_tagButton.titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
||||||
[_tagButton setBackgroundImage:[UIImage imageNamed:@"home_recommend_tag_bg"] forState:UIControlStateNormal];
|
|
||||||
_tagButton.hidden = YES;
|
_tagButton.hidden = YES;
|
||||||
_tagButton.userInteractionEnabled = NO;
|
_tagButton.userInteractionEnabled = NO;
|
||||||
}
|
}
|
||||||
|
@@ -115,7 +115,7 @@
|
|||||||
- (void)initSubViewConstraints {
|
- (void)initSubViewConstraints {
|
||||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.left.right.bottom.mas_equalTo(self.view);
|
make.left.right.bottom.mas_equalTo(self.view);
|
||||||
make.top.mas_equalTo(8);
|
make.top.mas_equalTo(6);
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user