修复了广场话题显示异常的问题

This commit is contained in:
fengshuo
2023-01-04 15:49:22 +08:00
parent 567f371a07
commit a5f5d97677
2 changed files with 2 additions and 2 deletions

View File

@@ -49,7 +49,7 @@
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.topicImageView).offset(7); make.left.mas_equalTo(self.topicImageView).offset(7);
make.size.mas_equalTo(CGSizeMake(25 * 1.3, 10 * 1.3)); make.size.mas_equalTo(CGSizeMake(25, 25));
make.centerY.mas_equalTo(self.topicImageView); make.centerY.mas_equalTo(self.topicImageView);
}]; }];

View File

@@ -72,7 +72,7 @@
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
MonentsTopicModel * topicModel = [self.topicList safeObjectAtIndex1:indexPath.row]; MonentsTopicModel * topicModel = [self.topicList safeObjectAtIndex1:indexPath.row];
CGFloat itemWidth = [topicModel.name boundingRectWithSize:CGSizeMake(100, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingTruncatesLastVisibleLine attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightBold]} context:nil].size.width; CGFloat itemWidth = [topicModel.name boundingRectWithSize:CGSizeMake(100, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingTruncatesLastVisibleLine attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightBold]} context:nil].size.width;
return CGSizeMake(itemWidth +34, 26); return CGSizeMake(itemWidth + 39, 26);
} }
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {