56 lines
1.5 KiB
Objective-C
56 lines
1.5 KiB
Objective-C
//
|
|
// MSSessionPublicChatHalTextCell.m
|
|
// YuMi
|
|
//
|
|
// Created by duoban on 2024/5/9.
|
|
//
|
|
|
|
#import "MSSessionPublicChatHalTextCell.h"
|
|
#import "MessageContentHeadLinesText.h"
|
|
@interface MSSessionPublicChatHalTextCell ()
|
|
@property(nonatomic,strong) MessageContentHeadLinesText *textView;
|
|
|
|
@end
|
|
@implementation MSSessionPublicChatHalTextCell
|
|
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
|
|
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
|
if(self){
|
|
[self installUI];
|
|
[self installConstraints];
|
|
}
|
|
return self;
|
|
}
|
|
- (void)render:(nonnull MessageBaseModel *)model {
|
|
[self.textView render:model];
|
|
}
|
|
-(void)installUI{
|
|
self.contentView.backgroundColor = [UIColor clearColor];
|
|
self.backgroundColor = [UIColor clearColor];
|
|
self.selectionStyle = 0;
|
|
[self.contentView addSubview:self.textView];
|
|
}
|
|
-(void)installConstraints{
|
|
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.edges.equalTo(self.contentView);
|
|
}];
|
|
}
|
|
#pragma mark - 懒加载
|
|
- (MessageContentHeadLinesText *)textView{
|
|
if(!_textView){
|
|
_textView = [[MessageContentHeadLinesText alloc]initWithFrame:CGRectZero];
|
|
}
|
|
return _textView;
|
|
}
|
|
- (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
|