got answer:
[atextView setTextContainerInset:UIEdgeInsetsMake(7, 7, 0, 0)];
fixed my problem.
And in Swift...
@IBOutlet var tv:UITextView!
override func awakeFromNib() {
super.awakeFromNib()
tv.textContainerInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
}
UPDATE: another option to do that.
UIView *spacerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
[msgtext setLeftViewMode:UITextFieldViewModeAlways];
[msgtext setLeftView:spacerView];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…