質問

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

役に立ちましたか?

解決

Use this from your TextFieldDelegate

TextField.keyboardType =UIKeyboardTypeNumbersAndPunctuation;

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top