How to enable .com key for UITextField keyboard?

How to enable the ".com" key on the keyboard for UITextField? For example, this key appears when a user clicks on a navigation item for an Apple browser. Can I specify a specific keyboard layout on the Internet?

+3
source share
1 answer

This should do the trick: (replace "myTextField" with the name of your text field, of course):

myTextField.keyboardType = UIKeyboardTypeURL;

See also: UITextInputTraits protocol that handles things like keyboard layout and auto-correction.

+3
source

Source: https://habr.com/ru/post/1743760/


All Articles