UILabel/UITextView等设置行间距

// 先初始化一个段落样式

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

// 调整行间距

[paragraphStyle setLineSpacing:3];
self.descLabel.attributedText =[[NSAttributedString alloc] initWithString: _model.desc                                   
attributes:@{NSFontAttributeName: 
[UIFont systemFontOfSize:11.f],                                                
NSForegroundColorAttributeName:[UIColor redColor],                                                NSParagraphStyleAttributeName:paragraphStyle}]; 

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