UITextView 修改行间距
2016-08-31 本文已影响20人
紫云夕月
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
paragraphStyle.lineSpacing = 0;
NSDictionary *attributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:14], NSParagraphStyleAttributeName:paragraphStyle};
_textview.attributedText = [[NSAttributedString alloc]initWithString:_textview.text attributes:attributes];