0
votes

I need to manually turn caps lock on, on the keyboard. Using autocapitalizationType property won't do the job. The problem is I am implementing a bullet list feature, where after the user inserts a bullet I need to turn on the capLock right away. This doesn't happen using standard autocapitalization because the first letter in my paragraph is @"•" rather than the text the user needs to enter.

Any way to turn capitalization on manually?

1

1 Answers

0
votes

I had a similar issue a while back and what I ended up doing was using the UITextFieldDelegate or UITextViewDelegate depending on which control you are using they both contain textField:shouldChangeCharactersInRange:replacementString: or textView:shouldChangeCharactersInRange:replacementString: which is called every time the content of the field is changed. This allows you to change the character values automatically.

Hope this helps.

You can check out the documentation here: https://developer.apple.com/library/ios/documentation/uikit/reference/UITextFieldDelegate_Protocol/UITextFieldDelegate/UITextFieldDelegate.html#//apple_ref/occ/intfm/UITextFieldDelegate/textField:shouldChangeCharactersInRange:replacementString: