How to prevent keyboard changing from Numbers to Alphabet when the space key is touched?
问题 I have UITextFields on a table to enter values. Some of these fields accept only numbers. I am using UIKeyboardTypeNumbersAndPunctuation for the keyboardType, and shouldChangeCharactersInRange to filter the characters. Also, all the corrections are disabled: textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation; textField.autocorrectionType = UITextAutocorrectionTypeNo; textField.autocapitalizationType = UITextAutocapitalizationTypeNone; On the numeric only fields, when the space key