UITextField - 取消建议的更正不起作用

时间:2011-07-11 14:32:50

标签: uitextfield

我以编程方式定义了UITextField。当我写东西时,我会得到一个建议的修正。如果我点击“X”不接受修正,则仍然进行修正。有什么建议可以解决这个问题?我这样定义:

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 个答案:

没有答案