// textview 改变字体的行间距
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.lineSpacing = 5;// 字体的行间距
paragraphStyle.paragraphSpacing = 15;//段与段之间的间距
paragraphStyle.firstLineHeadIndent = 20;
paragraphStyle.headIndent = 0;
NSDictionary *attributes = @{
// 字体、大小
NSFontAttributeName:[UIFont fontWithName:@"Arial" size:13.0],
// 字体颜色
NSForegroundColorAttributeName:kUIColorFromRGB(0x666666),
NSParagraphStyleAttributeName:paragraphStyle
};
NSString *textStr = @"dddd";
textView.attributedText = [[NSAttributedString alloc] initWithString:textStr attributes:attributes];