Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使文本输入在 iPhone 的文本字段中的一些空格后开始?
尝试这个
- (void) textFieldDidBeginEditing:(UITextField *)textField { UIView *paddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 20)]; textField.leftView = paddingView; textField.leftViewMode = UITextFieldViewModeAlways; }
希望这对你有帮助..