美文网首页
UITextView 修改行间距

UITextView 修改行间距

作者: 紫云夕月 | 来源:发表于2016-08-31 17:34 被阅读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];

相关文章

网友评论

      本文标题:UITextView 修改行间距

      本文链接:https://www.haomeiwen.com/subject/rmxcettx.html