문제

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