1.UITextView默认文字四周会有8 point的padding。
2.改变行间距的方法:使用富文本。具体代码:
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.lineSpacing =8;
NSDictionary *attributes = @{NSFontAttributeName:[UIFont systemFontOfSize:10], NSParagraphStyleAttributeName:paragraphStyle};
self.contentTextView.attributedText = [[NSAttributedString alloc] initWithString:contentString attributes:attributes];