What

A blog about user interfaces, mobile apps, code, and critique by a freelance iOS designer and developer.

Subscribe
Navigation
« Gmail Button Order | Main | YouTube Icon for ICS »
Wednesday
Feb222012

Number Only Keyboard for iPad

 

The iPad doesn't have a way to enter only numbers into a UITextField. Sure, you can use "numbers and punctuation", but that still gives the user a chance to enter errorous data.

 

To use:

keyboard = [[NumberKeyboard alloc] initWithNibName:@"NumberKeyboard" bundle:nil];
keyboard.textField = youTextField;
keyboard.showsPeriod = NO;
youTextField.inputView = keyboard.view;

 Also, release the keyboard in dealloc and #include "NumberKeyboard.h".

 

The GitHub project includes streatchable images for most key rows, so you can modify it into any number of different keyboards. It also has the PSD; the skys the limit.

 

https://github.com/stuartjmoore/NumberKeyboard

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>