label行间距

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];
上一篇:动画


下一篇:键盘的回收