修正热度值 UI

This commit is contained in:
edwinQQQ
2024-12-04 22:03:31 +08:00
parent 80abf631c6
commit 50bc8a28b3
2 changed files with 9 additions and 9 deletions

View File

@@ -48,6 +48,7 @@
self.membersCount = (kGetScaleWidth(345) - kGetScaleWidth(90))/kGetScaleWidth(20);
for (int i = 0; i < self.membersCount; i++) {
// for (int i = 0; i < 20; i++) {
NetImageConfig *config = [[NetImageConfig alloc]init];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
NetImageView *iconView = [[NetImageView alloc]initWithConfig:config];
@@ -56,7 +57,7 @@
iconView.layer.masksToBounds = YES;
iconView.layer.borderWidth = 1;
iconView.layer.borderColor = [UIColor whiteColor].CGColor;
iconView.hidden = YES;
iconView.hidden = NO;
[self.contentView addSubview:iconView];
CGFloat left = kGetScaleWidth(90) + i * kGetScaleWidth(16);
[iconView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -144,7 +145,7 @@
}];
[self.heatView mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(-kGetScaleWidth(8));
make.trailing.mas_equalTo(-8);
make.bottom.mas_equalTo(-kGetScaleWidth(10));
make.height.mas_equalTo(kGetScaleWidth(17));
}];
@@ -152,7 +153,7 @@
[self.heatGifView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kGetScaleWidth(14));
make.height.mas_equalTo(kGetScaleWidth(14));
make.trailing.equalTo(self.heatView.mas_leading).mas_offset(-kGetScaleWidth(7));
make.trailing.equalTo(self.heatView.mas_leading).mas_offset(-4);
make.centerY.equalTo(self.heatView);
}];
@@ -249,7 +250,7 @@
}];
self.flagImage.imageUrl = roomInfo.regionFlag;
_heatView.text = [NSString isEmpty:roomInfo.hotValue.stringValue] ? @"0" : roomInfo.hotValue.stringValue;
_heatView.text = [NSString isEmpty:roomInfo.hotValue.stringValue] ? @"0" : @(roomInfo.hotValue.integerValue).stringValue;
_pkImageView.hidden = !_roomInfo.crossPking;
if (roomInfo.hourTop > 0) {
@@ -269,9 +270,9 @@
iconView.hidden = YES;
}
}
[self.heatView mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(self.roomInfo.width);
}];
// [self.heatView mas_updateConstraints:^(MASConstraintMaker *make) {
// make.width.mas_equalTo(self.roomInfo.width);
// }];
[self layoutIfNeeded];
}
@@ -331,7 +332,6 @@
if(!_heatGifView){
_heatGifView = [UIImageView new];
_heatGifView.image = kImage(@"ms_home_heat_icon");
}
return _heatGifView;
}

View File

@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface XPRoomMessageTableViewCell : UITableViewCell
@property (nonatomic, assign) BOOL isLeftBoomImage;
@property (nonatomic, assign) BOOL isLeftBigImage;
///当前房间的类型
@property (nonatomic,assign) RoomType roomType;