UILabel 行间距设置

NSMutableAttributedString * attributedString1 = [[NSMutableAttributedString alloc] initWithString:testString]; 
NSMutableParagraphStyle * paragraphStyle1 = [[NSMutableParagraphStyle alloc] init]; 
[paragraphStyle1 setLineSpacing:15]; 
[attributedString1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle1 range:NSMakeRange(0, [testString length])]; 
[cLabel setAttributedText:attributedString1]; 
[cLabel sizeToFit];
 
//////////////////////////////////////////////////
https://github.com/nsdictionary?tab=repositories 

CoreLabel,此处博主还有其他很多框架,都还不错
posted @ 2015-05-25 18:29  天牛  阅读(227)  评论(0编辑  收藏  举报