iPhone Force Textbox Input to Upper Case
问题 How do I force characters input into a textbox on the iPhone to upper case? 回答1: Set autocapitalizationType to UITextAutocapitalizationTypeAllCharacters on the UITextField . See UITextInputTraits protocol (adopted by UITextField) for more details. 回答2: This solution is not fully satisfying. Even with the autocapitalizationType set to UITextAutocapitalizationTypeAllCharacters , the user can still press caps to release the caps lock. And the textField.text = [textField.text