http://www.cocoachina.com/bbs/read.php?tid=178403
#define LINESPACE 20
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 100, 320, 200)];
[label setBackgroundColor:[UIColor blackColor]];
[label setTextColor:[UIColor whiteColor]];
[label setNumberOfLines:0];
NSString *labelText = @"可以自己按照宽高,字体大小,来计算有多少行。。然后。。。每行画一个UILabel。。高度自己可以控制把这个写一个自定义的类。 ";
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:labelText];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle setLineSpacing:LINESPACE];//调整行间距
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [labelText length])];
label.attributedText = attributedString;
[self.view addSubview:label];
[label sizeToFit];
![](http://cdn.cocimg.com/bbs/attachment/Fid_21/21_2069_0571ac5c5f282e7.png)
![](http://cdn.cocimg.com/bbs/attachment/Fid_21/21_2069_f695b9ec1f078e8.png)
![](http://cdn.cocimg.com/bbs/attachment/Fid_21/21_2069_5f3107c4fd002df.png)