Custom numbers and characters keyboard for iPhone in Objective C

cocoa-touch, ios, objective-c, uikeyboard

Solution

The image in your question is from the 5RowQWERTY project: http://code.google.com/p/networkpx/wiki/Using_5RowQWERTY

This project only works on a jailbroken device (as far as I can tell) and certainly uses private APIs, making it unacceptable for the app store. If those restrictions are ok with you, then just use that project. It installs a new keyboard layout file (`layout.plist`).

If you want to run on non-jailbroken devices, or put your app in the app store, you won't be able to use that method. I see three options:

Dig around in the keyboard's view hierarchy after it appears (it has its own `UIWindow` so start with the `[[UIApplication sharedApplication] windows]` array) and add your own number buttons. This is a lot of work, very tricky to do well, and quite likely to be rejected by Apple anyway.

Reimplement the keyboard from scratch. This is a huge amount of work if you want to support multiple keyboard layouts and truly match the feel and behavior of the system keyboard.

Give up and just set `inputAccessoryView` to a row of number buttons. This is easy.

My advice is that anything but option 3 is a waste of time. Just use an `inputAccessoryView` to display a number bar and move on to the parts of your app that add real value for your users.

Problem

The keyboard shown below is not part of the defaults supplied by Cocoa, so it has to be custom built. I need to create a keyboard that looks just like the one below. I've seen a few apps out there that use it, I saw some tutorials that add a custom bar on top with some buttons, but I need it to look and function just like a normal keyboard but with an extra row of numbers. How can this be done programmatically in Objective C? Can someone please point me in the right direction?

Original source

Related problems