UITextView 修改行间距

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 修改行间距)