I have a UITextField
defined programatically. When I write something, I get a suggested correction. If I tap the开发者_JS百科 "X" for not accepting the correction, the correction is still made. Any suggestions to solve this issue? I'm defining it like this:
CGRect frame =CGRectMake(10 ,0 , 290, 44);
self.textField = [[UITextField alloc]initWithFrame:frame];
self.textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
self.textField.clearButtonMode = UITextFieldViewModeWhileEditing;
[self.textField setBorderStyle:UITextBorderStyleNone];
self.textField.secureTextEntry = NO;
self.textField.autocorrectionType = UITextAutocorrectionTypeYes;
self.textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
self.textField.delegate = self;
[self.textField setReturnKeyType:UIReturnKeySearch];
精彩评论