1,TextView的设置,为属性textContainerInset
/修改textview的内边距要注意_textview.contentInset和_textview.textContainerInset的区别,这里容易混淆
_textview.textContainerInset = UIEdgeInsetsMake(0, 0, 0, 0); //设置方法如此
具体使用如下:
_textview = [[UITextView alloc]initWithFrame:CGRectMake(20, 300, W -40, 120)];
_textview.textColor = [UIColor whiteColor];
_textview.textAlignment = NSTextAlignmentLeft;
_textview.delegate = self;
_textview.textContainerInset = UIEdgeInsetsMake(0, 0, 0, 0);