ioskeyboarduitextfieldcustom-keyboarduitextinput

How to detect from inside iOS keyboard the UITextInput settings


I would like to customize the iOS keyboard behavior to adapt to the UITextInput inside the app that it's showing up.

For example, when someone entering a URL inside Safari, the keyboard's return key should instead say "Go", autocorrect and auto-capitalization should both be spelled.

I looked through UITextInput protocol reference, but was unable to find any information about detecting the settings. Any help is much appreciated, thanks.


Solution

  • you should look at UITextInputTraits, and UITextField supports it.