Question

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?

enter image description here

Was it helpful?

Solution

Use this from your TextFieldDelegate

TextField.keyboardType =UIKeyboardTypeNumbersAndPunctuation;

If you are using IB, change Keyboard type to "Numbers And Punctuation" from attribute inspector

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top