标签:ios 字体样式 ios开发 coretext 字体行间距
-(void)setLabLineSpacing:(UILabel *)aLab line:(float)fl{
NSMutableAttributedString * attributedString = [[NSMutableAttributedString alloc] initWithString:aLab.text];
NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle setLineSpacing:20];
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [aLab.text length])];
[aLab setAttributedText:attributedString];
}
标签:ios 字体样式 ios开发 coretext 字体行间距
原文地址:http://blog.csdn.net/u012460084/article/details/41040875