(IOS)设置UILabel行间距

NSMutableAttributedString* attrString = [[NSMutableAttributedString  alloc] initWithString:label.text];

NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];

[style setLineSpacing:20];

[attrString addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0,label.text.length)];

label.attributedText = attrString;

你可能感兴趣的:((IOS)设置UILabel行间距)