方法写在UILabel的分类category中
- (void)setParagraphText:(NSString*)text{
if(text == nil || text.length == 0){
return;
}
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:text];;
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
[paragraphStyle setLineSpacing:5];
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, text.length)];
self.attributedText = attributedString;
}