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.

Posted in Text input | 1 Comment

Hello World

Hello, World. I am Kelvin Kao, iPhone OS/iOS app developer, and welcome to my blog.

I have been developing on the platform for about two years now. Before this, I was also working in the mobile industry as a BREW (Binary Runtime Environment for Wireless) developer. BREW was the platform for carriers like Verizon, AllTel, US Cellular… you know, the ones that used CDMA. When the recession hit, the handset releases slowed down. Couple that with the rise of smart phones, we were starting to have a hard time getting BREW projects. That was when I started learning to develop on the iPhone.

It was actually exciting to start developing things from scratch. When I was doing BREW work, it was all porting and debugging. It was fun in its own way, but after a few years of that, writing apps from scratch was something quite refreshing. I did wasted quite some time learning by trial-and-error though, because I was just going through Apple documentations. It wasn’t that they were not well written, but rather, I didn’t really know which ones were relevant and important for my own purpose.

But it got a lot better after I read Jeff Lamarche‘s book. By the time I read the book, I had already finished one project on my own (that was re-written several times every time I figured out a better way of doing something). A good chunk of the book was review for me but some parts were new, but I think the best thing that I got out of it was which concepts and features were more important and frequently used. If you knew which parts they were, you could make an effort to know it inside and out before you moved on to something else.

Nowadays I still read many blogs on iOS development to keep up. Google was also quite handy in answering questions. And I felt like people had written about all kinds of topics and I wouldn’t necessarily write them better if I were to write those posts. However, recently, I was researching Protocol Buffers and realized that there weren’t that much written about it when it came to Objective-C. While it was probably because it was not used that much (certainly not as much as XML and JSON) on this platform, I thought it would be nice to contribute. I did answer questions on iPhone Dev SDK Forum for a while but I thought it would be nice to have everything in one place.

I am no stranger to blogging, however. I have been blogging on my current main blog, Puppet Kaos, for a while now. I just did not feel like writing about programming that much because I felt like I had to mentally filter what I could and could not disclose when I was doing projects for clients. But nowadays, I feel like I can talk more about what I figured out, because I am doing development rather than porting/debugging. There’s more of a separation between the technical aspect and the specifics of the projects now. Or maybe I just had a shift in mentality. I don’t know. But anyway, here’s this blog.

I am going to share more of my ongoing journey with iOS development. So stay tuned, or not.

Posted in Thoughts | Leave a comment