Use this from your TextFieldDelegate
TextField.keyboardType =UIKeyboardTypeNumbersAndPunctuation;
If you are using IB, change Keyboard type to "Numbers And Punctuation" from attribute inspector
Domanda
The problem I am faced with, is that the (default) keyboard on iOS is in its first state (default - qwerty) when starting to type in a textfield, and I would like this state to be the (default - number) state, which is seen when the user presses the ".?123" button. Is there any way to set this state initially?
Soluzione
Use this from your TextFieldDelegate
TextField.keyboardType =UIKeyboardTypeNumbersAndPunctuation;
If you are using IB, change Keyboard type to "Numbers And Punctuation" from attribute inspector