UILABEL 设置行间距:
UILabel *bodyLabel = [UILabel new];
bodyLabel.frame =CGRectMake(0, 0, self.view.dd_w, 120);
bodyLabel.text =@"有人说,生活如水,何必要颠簸出浪花,最后,溅了自己一身水,平平淡淡才是真。但我其实并不这样认为,生活虽然只是一杯无味的水,但如果我们添一些“调味剂”呢!如果你努力工作,挥洒汗水,就一定会收获一杯香甜的水。但如果你懒惰贪婪,不久疾病就会在你身上永不离身,自然就会得到一杯苦涩的了。";
[self.viewaddSubview:bodyLabel];
NSMutableAttributedString *attribute = [[NSMutableAttributedString alloc] initWithString:bodyLabel.text];
NSMutableParagraphStyle *paragrap = [[NSMutableParagraphStyle alloc] init];
[paragrap setLineSpacing:10.5f]; // 行间距高度
NSRange range =NSMakeRange(0.f, [bodyLabel.textlength]);
[attribute addAttribute:NSParagraphStyleAttributeNamevalue:paragraprange:range];
[bodyLabel setAttributedText:attribute];
[bodyLabel setFont:[UIFontsystemFontOfSize:12]];
[bodyLabel sizeToFit];