_contentLabel.frame = CGRectMake(8, 136, SCREEN_WIDTH - 16, 1);
_contentLabel.numberOfLines = 0;
_contentLabel.text = [Collect replaceNull:[_contentDic objectForKey:@"description"]];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:_contentLabel.text];;
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
[paragraphStyle setLineSpacing:5];
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, _contentLabel.text.length)];
_contentLabel.attributedText = attributedString;
[_contentLabel sizeToFit];
UILabel行高设置
最新推荐文章于 2021-06-27 13:00:07 发布