_textView = [[UITextView alloc] initWithFrame:(CGRectMake(0, 0, self.width - 2 * kNOMOLoginActiveViewPadding, 44))];
_textView.scrollEnabled = NO;
_textView.editable = NO;
_textView.selectable = NO;
_textView.showsVerticalScrollIndicator = NO;
_textView.showsHorizontalScrollIndicator = NO;
//两种方法设置内容紧贴边界
// _textView.contentInset = UIEdgeInsetsMake(0, -5, 0, -5);
_textView.textContainer.lineFragmentPadding = 0;
// 换行模式
_textView.textContainer.lineBreakMode = NSLineBreakByCharWrapping;
_textView.textContainerInset = UIEdgeInsetsZero;
_textView.contentMode = UIViewContentModeScaleToFill;
_textView.textAlignment = NSTextAlignmentLeft;
if (IS_IOS11) {
_textView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
网友评论