50 lines
1.6 KiB
Objective-C
50 lines
1.6 KiB
Objective-C
//
|
|
// QXRankListCell.m
|
|
// IsLandVoice
|
|
//
|
|
// Created by 启星 on 2025/3/4.
|
|
//
|
|
|
|
#import "QXRankListCell.h"
|
|
|
|
@implementation QXRankListCell
|
|
+(instancetype)cellWithTableView:(UITableView *)tableView{
|
|
static NSString *cellId = @"QXRankListCell";
|
|
QXRankListCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
|
if (!cell) {
|
|
cell = [[NSBundle mainBundle] loadNibNamed:cellId owner:nil options:nil].lastObject;
|
|
cell.backgroundColor = UIColor.clearColor;
|
|
}
|
|
return cell;
|
|
}
|
|
-(void)setRankType:(NSInteger)rankType{
|
|
_rankType = rankType;
|
|
}
|
|
-(void)setModel:(QXMyRankModel *)model{
|
|
_model = model;
|
|
if (self.rankType == 0) {
|
|
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
|
self.nameLabel.text = model.room_name;
|
|
self.valueLabel.text = [NSString qx_showHotCountNum:model.total.longLongValue];
|
|
self.numberLabel.text = model.rank;
|
|
}else{
|
|
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
|
self.nameLabel.text = model.nickname;
|
|
self.valueLabel.text = [NSString qx_showHotCountNum:model.total.longLongValue];
|
|
self.numberLabel.text = model.rank;
|
|
}
|
|
|
|
}
|
|
- (void)awakeFromNib {
|
|
[super awakeFromNib];
|
|
// Initialization code
|
|
}
|
|
|
|
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
|
[super setSelected:selected animated:animated];
|
|
|
|
// Configure the view for the selected state
|
|
}
|
|
|
|
@end
|