Sets the keyboard type for this view.
- iOS 13.0+
- Mac Catalyst 13.0+
- tvOS 13.0+
- Xcode 11.0+
One of the keyboard types defined in the
keyboard to specify the keyboard type to be used for text entry. A number of different keyboard types are available to meet specialized input needs, such as entering email addresses or phone numbers.
The example below presents a
Text to input an email address. Setting the text field’s keyboard type to
UIKeyboard ensures the user can only enter correctly formatted email addresses.