103 lines
4.8 KiB
Objective-C
103 lines
4.8 KiB
Objective-C
//
|
|
// QXHomeRoomCell.m
|
|
// IsLandVoice
|
|
//
|
|
// Created by 启星 on 2025/4/12.
|
|
//
|
|
|
|
#import "QXHomeRoomCell.h"
|
|
@interface QXHomeRoomCell()
|
|
@property (nonatomic,strong)NSMutableArray *imgs;
|
|
@end
|
|
@implementation QXHomeRoomCell
|
|
- (void)setModel:(QXRoomListModel *)model{
|
|
_model = model;
|
|
[self.coverImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover]];
|
|
self.IDLabel.text = [NSString stringWithFormat:@"ID:%@",model.room_number];
|
|
self.nameLabel.text = [NSString stringWithFormat:@"%@",model.room_name];
|
|
self.countLabel.text = [NSString qx_showHotCountNum:model.hot_value.longLongValue];
|
|
// if ([model.label_id isEqualToString:@"23"]) {
|
|
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7153"];
|
|
// }else if ([model.label_id isEqualToString:@"108"]){
|
|
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7154"];
|
|
// }else if ([model.label_id isEqualToString:@"101"]){
|
|
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7155"];
|
|
// }else if ([model.label_id isEqualToString:@"121"]){
|
|
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7160"];
|
|
// }else if ([model.label_id isEqualToString:@"120"]){
|
|
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7156"];
|
|
// }
|
|
[self.roomTypeView sd_setImageWithURL:[NSURL URLWithString:model.label_icon]];
|
|
|
|
|
|
}
|
|
-(void)startAnimating{
|
|
[self.animateImageView startAnimating];
|
|
}
|
|
-(void)endAnimating{
|
|
[self.animateImageView stopAnimating];
|
|
}
|
|
-(void)setHistoryModel:(QXMyRoomHistory *)historyModel{
|
|
_historyModel = historyModel;
|
|
[self.coverImageView sd_setImageWithURL:[NSURL URLWithString:historyModel.room_cover]];
|
|
self.IDLabel.text = [NSString stringWithFormat:@"ID:%@",historyModel.room_number];
|
|
self.nameLabel.text = [NSString stringWithFormat:@"%@",historyModel.room_name];
|
|
self.countLabel.text = [NSString qx_showHotCountNum:historyModel.hot_value.longLongValue];
|
|
[self.roomTypeView sd_setImageWithURL:[NSURL URLWithString:historyModel.label_icon]];
|
|
}
|
|
-(void)setSearchModel:(QXSearchModel *)searchModel{
|
|
_searchModel = searchModel;
|
|
[self.coverImageView sd_setImageWithURL:[NSURL URLWithString:searchModel.picture]];
|
|
self.IDLabel.text = [NSString stringWithFormat:@"ID:%@",searchModel.code];
|
|
self.nameLabel.text = [NSString stringWithFormat:@"%@",searchModel.name];
|
|
self.countLabel.text = [NSString qx_showHotCountNum:searchModel.hot_value.longLongValue];
|
|
[self.roomTypeView sd_setImageWithURL:[NSURL URLWithString:searchModel.label_icon]];
|
|
}
|
|
//-(void)setHotRoomModel:(SRHomeChatRoomListModel *)hotRoomModel{
|
|
// _hotRoomModel = hotRoomModel;
|
|
// [self.coverImageView sd_setImageWithURL:[NSURL URLWithString:hotRoomModel.cover_picture]];
|
|
//// self.IDLabel.text = [NSString stringWithFormat:@"ID:%lld",model.room_id];
|
|
// self.nameLabel.text = [NSString stringWithFormat:@"%@",hotRoomModel.room_name];
|
|
// self.countLabel.text = [NSString stringWithFormat:@"%@",hotRoomModel.popularity];
|
|
// if ([hotRoomModel.label_id isEqualToString:@"23"]) {
|
|
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7153"];
|
|
// }else if ([hotRoomModel.label_id isEqualToString:@"108"]){
|
|
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7154"];
|
|
// }else if ([hotRoomModel.label_id isEqualToString:@"101"]){
|
|
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7155"];
|
|
// }else if ([hotRoomModel.label_id isEqualToString:@"121"]){
|
|
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7160"];
|
|
// }else if ([hotRoomModel.label_id isEqualToString:@"120"]){
|
|
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7156"];
|
|
// }
|
|
//
|
|
// self.animateImageView.animationDuration = 1;
|
|
// self.animateImageView.animationImages = self.imgs;
|
|
// [self.animateImageView startAnimating];
|
|
//}
|
|
|
|
-(NSMutableArray *)imgs{
|
|
if (!_imgs) {
|
|
_imgs = [NSMutableArray array];
|
|
for (int i = 0; i < 14; i++) {
|
|
NSString *str = [NSString stringWithFormat:@"Flow 100%02d",i];
|
|
UIImage *img = [UIImage imageNamed:str];
|
|
[_imgs addObject:img];
|
|
}
|
|
}
|
|
return _imgs;
|
|
}
|
|
- (void)awakeFromNib {
|
|
[super awakeFromNib];
|
|
// Initialization code
|
|
if (self.isAppStore) {
|
|
[self.displayMaskView setTopToBottomGradientBackgroundWithColors:@[[UIColor colorWithHexString:@"#00000000"],[UIColor colorWithHexString:@"#00000096"]] frame:CGRectMake(0, 0, ScaleWidth(90),ScaleWidth(90))];
|
|
}else{
|
|
[self.displayMaskView setTopToBottomGradientBackgroundWithColors:@[[UIColor colorWithHexString:@"#00000000"],[UIColor colorWithHexString:@"#00000096"]] frame:CGRectMake(0, 0, (SCREEN_WIDTH-15*3-1)/2.0, (SCREEN_WIDTH-15*3-1)/2.0)];
|
|
}
|
|
self.animateImageView.animationDuration = 1;
|
|
self.animateImageView.animationImages = self.imgs;
|
|
}
|
|
|
|
@end
|