- 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];
UIlabel 行间距的设置
最新推荐文章于 2024-09-18 14:25:23 发布