开发者

UITextField - cancel suggested correction not working

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜