NSString *dLabelString = @"1. XXXXXXX \n2. XXXXXXXX\n3. XXXXXXXX";
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:dLabelString];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
//行间距
[paragraphStyle setLineSpacing:5.0];
//段落间距
[paragraphStyle setParagraphSpacing:7];
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [dLabelString length])];
label.attributedText = attributedString;
网友评论