I'm writing custom text editor with specific chars (non-english).
I know about property - autocapitalizationType to change capital, but before to view开发者_StackOverflow中文版ing (changing) of char i NEED TO know about state of current keyboard.
And how to get the CAPS LOCK (pressed Shift key) key state of keyboard programmatically on IOS 4.0 SDK?
As of the moment, there is no way to enable CAPs lock on the keyboard simply because you can't touch/modify Apple's APIs. The only states you can receive from their keyboard are:
UIKeyboardWillShowNotification
UIKeyboardDidShowNotification
UIKeyboardWillHideNotification
UIKeyboardDidHideNotification
The only way you can do something like that is to create your own keyboard class or find a custom implementation online. Good luck!
Try this
self.yourTexField.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters;
精彩评论