-1

I work on a iPhone project with iOS 4 and Xcode 4.

In a view I have several UITextField, that the user fills with numbers. So only the Numbers keyword is used.

When the user fills in a text field and click Go, some processing is started (modification of the text of several textFields).

Now I would like to consider also a second option: user open the keyboard but then decides to close it without any process (i.e. cancel the process).

So I need a keyboard with a cancel key as shown on this the picture:

enter image description here

Finally my question: how can I create a keyboard with a cancel key as above?

Edit: picture of my view

enter image description here

Himanshu
  • 31,810
  • 31
  • 111
  • 133
boscarol
  • 1,901
  • 2
  • 15
  • 29
  • Many duplicates, e.g. [Customizing the iPhone keyboard](http://stackoverflow.com/questions/1014705/customizing-the-iphone-keyboard) – Paul R Aug 04 '11 at 12:49
  • Just a sidenote, a suggestion for your UI: the symbol `÷` does not indicate a range but a division. You should user "0 ~ 255" instead of "0 ÷ 255". – Cyrille Aug 04 '11 at 13:18

1 Answers1

2

The keyboard cannot be modified. You should add a cancel button, or some other way of triggering a cancel, in your UI.

Paul Tiarks
  • 1,881
  • 1
  • 13
  • 10
  • I could perhaps use the key "space" as cancel. "Space" is currently captured by shouldChangeCharactersInRange – boscarol Aug 04 '11 at 12:52
  • I wouldn't recommend it. A button should do what it says. Again, you should add a cancel button, or another way trigger a cancel, in your UI in some way. – Paul Tiarks Aug 04 '11 at 12:55
  • unfortunately there is very little space. see picture above – boscarol Aug 04 '11 at 13:15