增加换肤功能
This commit is contained in:
42
QXLive/Message(音信)/View/QXSystemNoticeCell.m
Normal file
42
QXLive/Message(音信)/View/QXSystemNoticeCell.m
Normal file
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// QXSystemNoticeCell.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/28.
|
||||
//
|
||||
|
||||
#import "QXSystemNoticeCell.h"
|
||||
|
||||
@implementation QXSystemNoticeCell
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView{
|
||||
static NSString *cellId = @"QXSystemNoticeCell";
|
||||
QXSystemNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
||||
if (!cell) {
|
||||
cell = [[NSBundle mainBundle] loadNibNamed:cellId owner:nil options:nil].lastObject;
|
||||
cell.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(void)setModel:(QXMessageListModel *)model{
|
||||
_model = model;
|
||||
self.contentLabel.text = model.content;
|
||||
[self.noticeImageView sd_setImageWithURL:[NSURL URLWithString:model.image]];
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:model.createtime.longLongValue]; //此处根据项目需求,选择是否除以1000 , 如果时间戳精确到秒则去掉1000
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
|
||||
formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss";
|
||||
NSString*time = [formatter stringFromDate:date];
|
||||
self.timeLabel.text = time;
|
||||
}
|
||||
- (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
|
||||
Reference in New Issue
Block a user