Commit d8e681e9e51348350de58ee46ccb073da189b135
1 parent
eb33d63d
0.0.9
Showing
3 changed files
with
10 additions
and
7 deletions
CNLiveCMineModule.podspec
CNLiveCMineModule/Classes/inte/View/CNLiveCMineInteCollectionViewCell.m
| ... | ... | @@ -493,7 +493,7 @@ |
| 493 | 493 | self.nameLabel.text = annouModel.title; |
| 494 | 494 | self.dateLabel.text = annouModel.publishTime; |
| 495 | 495 | |
| 496 | - if ([annouModel.model isEqualToString:@"roof"]) { | |
| 496 | + if ([annouModel.model cn_containsString:@"roof"]) { | |
| 497 | 497 | self.tagLabel.backgroundColor = UIColorHex(#F5A623); |
| 498 | 498 | self.tagLabel.text = @" 置顶 "; |
| 499 | 499 | __weak typeof(self) weakSelf = self; | ... | ... |
CNLiveCMineModule/Classes/inte/View/CNLiveCMineInteHeaderSignView.m
| ... | ... | @@ -170,12 +170,15 @@ |
| 170 | 170 | self.annouLabel.hidden = announModel.list.count == 0; |
| 171 | 171 | if (announModel.list.count > 0) { |
| 172 | 172 | NSMutableArray * listArray = announModel.list.mutableCopy; |
| 173 | - NSArray * tempArray = announModel.list.count > 5 ? [listArray subarrayWithRange:NSMakeRange(0, 4)] : listArray; | |
| 174 | - NSMutableString * tempString = [[NSMutableString alloc] init]; | |
| 175 | - for (CNLiveCMineInteListSubModel * subModel in tempArray) { | |
| 176 | - [tempString appendFormat:@"%@ ",subModel.title]; | |
| 173 | + NSMutableString * tempString_roof = [[NSMutableString alloc] init]; | |
| 174 | + NSMutableString * tempString_none = [[NSMutableString alloc] init]; | |
| 175 | + for (CNLiveCMineInteListSubModel * subModel in listArray) { | |
| 176 | + if ([subModel.model cn_containsString:@"roof"]) { | |
| 177 | + [tempString_roof appendFormat:@"%@ ",subModel.title]; | |
| 178 | + } | |
| 179 | + [tempString_none appendFormat:@"%@ ",subModel.title]; | |
| 177 | 180 | } |
| 178 | - self.annouLabel.text = tempString; | |
| 181 | + self.annouLabel.text = !CNLiveStringIsEmpty(tempString_roof) ? tempString_roof : tempString_none; | |
| 179 | 182 | } |
| 180 | 183 | |
| 181 | 184 | if (announModel == nil) self.titleLabel.top = CGRectGetMaxY(self.topView.frame) + 10; | ... | ... |