ios4 - autocapitalizationType 不工作

标签 ios4 uitextfield

我试图通过设置 autocapitalizationType 来保留 textField "Capital"的第一个字符,但它不起作用。下面是相同的 src 代码的快照。

UITextField* returnTextField = [[UITextField alloc] initWithFrame:frame];
returnTextField.autocorrectionType = UITextAutocorrectionTypeNo;
returnTextField.autocapitalizationType = UITextAutocapitalizationTypeWords;
returnTextField.keyboardType = UIKeyboardTypeEmailAddress;
returnTextField.returnKeyType = UIReturnKeyGo;
returnTextField.clearButtonMode = UITextFieldViewModeWhileEditing;  
returnTextField.delegate = self;
谢谢,
萨加尔

最佳答案

如果您使用硬件键盘在文本字段中输入,它会忽略自动大写。但是,如果您在模拟器屏幕上使用键盘,它应该自动将单词大写。

关于ios4 - autocapitalizationType 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4449201/

相关文章:

iphone - SQLite sqlite3_prepare_v2 没有错误但也没有

ios - 在 Iphone 中选择按钮时更改按钮的图像

ios4 - CTTypesetterCreateLineWithOffset 与 CTTypesetterCreateLine 有何不同?

ios - 选择器 'datePicker' 没有已知的类方法

iphone - 丢失了我的 xcode 项目中的所有目标

java - 多行 JTextField 的问题

ios - 将 UITextField 添加到 UIToolbar 不起作用

ios - 如果用户单击单个 View Controller 内的按钮,是否可以显示其他文本字段?

ios - 动态/可取消排队的 UITableviewcells 中的 UITextfield

iphone - iOS中是否有办法观察按下主屏幕按钮?