UILabel设置行高
作者:
Do_More | 来源:发表于
2017-08-21 12:48 被阅读0次NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:self.tipsLabel.text];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle setLineSpacing:4];
[attributedString addAttribute:NSParagraphStyleAttributeName
value:paragraphStyle
range:NSMakeRange(0, [self.tipsLabel.text length])];
self.tipsLabel.attributedText = attributedString;
本文标题:UILabel设置行高
本文链接:https://www.haomeiwen.com/subject/yhpcdxtx.html
网友评论