1

I want to add a "Discard" and a done button in my number keypad. Please see the image below.

Do IOS provide these buttons by-default or do I need to add images for them.

iPhone Number Key Pad

Abhinav
  • 37,684
  • 43
  • 191
  • 309

2 Answers2

4

There are some unofficial techniques you can use to hack the keyboard view and add your own button(s) to cover the keyboard keyboard (google for it if you want), but these are unreliable (likely to stop working in a future release) and could get your app banned from the app store (you are not supposed to customise things like that).

The recommended technique is to place your own done button above the keyboard view, as Safari does it (see this screenshot for <input type="tell"> in mobile safari: http://www.456bereastreet.com/archive/201004/html5_input_types/).

These buttons are created with an "accessory view" on your text field. Apple has sample code how to do so here: http://developer.apple.com/library/ios/#samplecode/KeyboardAccessory/Introduction/Intro.html

Abhi Beckert
  • 32,787
  • 12
  • 83
  • 110
1

Sorry, but you need to roll your own.

You can follow this method more or less.

Community
  • 1
  • 1
Mundi
  • 79,884
  • 17
  • 117
  • 140