The Various iPhone Keyboard Styles

When you are working with UITextField and UITextView in your iPhone app, there are several keyboard styles available. Since both classes implement the UITextInputTraits protocol, this can be accomplished by modifying the keyboardType property. While the documentation describes what the different keyboards look like, a picture is worth a thousand words. So here are the screen shots: (The bold parts are straight from the Apple documentation)

UIKeyboardTypeDefault

Use the default keyboard for the current input method.
At the moment I had it set to the regular English keyboard, so this happened to be the exact same thing as UIKeyboardTypeASCIICapable.

UIKeyboardTypeASCIICapable

Use a keyboard that displays standard ASCII characters.

And after you click on “,123”, you get:

And this is the “#+=” keyboard:

UIKeyboardTypeNumbersAndPunctuation

Use the numbers and punctuation keyboard.

UIKeyboardTypeURL

Use a keyboard optimized for URL entry. This type features “.”, “/”, and “.com” prominently.

And this is the “@123” keyboard:

And “#+=” keyboard:

UIKeyboardTypeNumberPad

Use a numeric keypad designed for PIN entry. This type features the numbers 0 through 9 prominently. This keyboard type does not support auto-capitalization.
Also note that there is no Return key.

UIKeyboardTypePhonePad

Use a keypad designed for entering telephone numbers. This type features the numbers 0 through 9 and the “*” and “#” characters prominently. This keyboard type does not support auto-capitalization.
This is basically the UIKeyboardTypeNumberPad, except that it has +, * and #

UIKeyboardTypeNamePhonePad

Use a keypad designed for entering a person’s name or phone number. This keyboard type does not support auto-capitalization.
This starts out looking like UIKeyboardTypeASCIICapable, but basically changes into UIKeyboardTypePhonePad after you click on “123”.

UIKeyboardTypeEmailAddress

Use a keyboard optimized for specifying email addresses. This type features the “@”, “.” and space characters prominently.

And this is the “_123” keyboard:

And “#+=”:

UIKeyboardTypeAlphabet

Deprecated. Use UIKeyboardTypeASCIICapable instead.
Now the enum is just defined to be equal to UIKeyboardTypeASCIICapable, but you never know when they are going to change it. Stay away from the deprecated constant.

This entry was posted in Text input. Bookmark the permalink.

One Response to The Various iPhone Keyboard Styles

  1. Andre says:

    hey man I like it. I’m going to write more posts and put your ideas to the test. After all, we always have something new to learn and being humble, I came here to learn. Bookmarked.

    – Andre

Leave a Reply

Your email address will not be published. Required fields are marked *