|
|
|
UIKeyboardTypeNumberPad and the missing "return" key |
|
|
|
|
News -
Development
|
|
Written by Luzian Scherrer
|
|
Tuesday, 21 April 2009 01:00 |
|
UPDATE 17 June 2010
With the arrival of new iOS versions (like 3.2 for iPad and 4.0 for iPhone/iPod touch), some internals regarding our solution have seized working due to changes in the SDK on Apple's side (as some of our readers pointed out in the comments). Now we have updated our solution to also work with iOS versions > 3.1.3 (meaning specifically 3.2 and 4.0GM "golden master").
Please feel free to download the complete XCode project at the bottom of the article.
To keep it short, the behaviour of the keyboard has changed in versions > 3.1.3 in such a manner that it's no longer possible to add the button before the keyboard slides up. This means that the done button has to be added after the keyboard is put in place. This has been pointed out and explained in more detail by one of our readers.
In that way, the new solution is not perfect. On the other hand, most users will not be aware of it anyway. We're looking into the matter in more detail when we find some spare time and maybe come up with a more sophisticated solution.
If you have ever written an iPhone app that requires numeric input, then you surely know about the UIKeyboardTypeNumberPad. And if you have ever used that flavor of the iPhone's keyboard, then you surely know that it lacks one very important feature: The UIKeyboardTypeNumberPad does not have a "return" key.
In fact every other keyboard type (except for the pretty similar UIKeyboardTypePhonePad) does offer the possibility to be dismissed by setting the returnKeyType property of the corresponding UITextInputTraits implementor. So how does one achieve the same effect with the number pad? We have found a workround!
|
|
Read more...
|
|
|
|
|
|