//这里设置光标位置,让光标位置后移10
textField.leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 10, 0)];
textField.leftViewMode = UITextFieldViewModeAlways;
//这里设置光标位置,让光标位置后移10
textView.textContainer.lineFragmentPadding = 0;
textView.textContainerInset = UIEdgeInsetsMake(10, 10, 0, 0);
网友评论