// // MineIntroduceCell.m // KulexiuForTeacher // // Created by 王智 on 2022/4/2. // #import "MineIntroduceCell.h" @interface MineIntroduceCell () @property (weak, nonatomic) IBOutlet UILabel *introduceLabel; @end @implementation MineIntroduceCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code self.selectionStyle = UITableViewCellSelectionStyleNone; } - (void)configIntroduce:(NSString *)introduceString { if ([NSString isEmptyString:introduceString]) { introduceString = @"暂无简介内容"; } NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; [paragraphStyle setLineSpacing:4];//调整行间距 NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:introduceString attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x666666)}]; self.introduceLabel.attributedText = attrs; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end