UITextView autocapitalization not working for first word of input?
I've created a UITextView and set the autocapitalization property to UITextAutocapitalizationTypeSentences or to UITextAutocapitalizationTypeWords. Both settings work as expected except for the first word that is typed, which is not autocapital开发者_StackOverflowized! It is autocapitalized if the user deletes the text taking the cursor back to the start of the line.
My workaround would be to convert the first letter from uppercase to lowercase in the UITextView delegate method textView:shouldChangeTextInRange:replacementText:.
The only tiny issue that remains is that the user is unable to tap on the shift key to prevent the first word from capitalizing.
Do other people experience this issue and is this what you've done?
Thanks.
I think this may be an issue with the simulator. It seems to be working fine on the device!
精彩评论