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];

上一篇 下一篇

猜你喜欢

热点阅读