![](https://img.haomeiwen.com/i1354453/6659d06749398c0a.png)
// 设置文本框最左侧有一段间距
UIView *leftVw = [[UIView alloc] init];
leftVw.frame = CGRectMake(0, 0, 5, 1);
// 把leftVw设置给文本框
self.txtInput.leftView = leftVw;
self.txtInput.leftViewMode = UITextFieldViewModeAlways;
// 设置文本框最左侧有一段间距
UIView *leftVw = [[UIView alloc] init];
leftVw.frame = CGRectMake(0, 0, 5, 1);
// 把leftVw设置给文本框
self.txtInput.leftView = leftVw;
self.txtInput.leftViewMode = UITextFieldViewModeAlways;
本文标题:通过TextField左视图设置光标位置
本文链接:https://www.haomeiwen.com/subject/eqodaqtx.html
网友评论