How to set number side as default (while keyboard is open) of name phone pad keyboard type

后端 未结 2 1820
逝去的感伤
逝去的感伤 2021-02-19 08:45

Right now when the keyboard launches on my application it defaults to the letter side showing an alphabetical keyboard.

Question will be listed below images

2条回答
  •  你的背包
    2021-02-19 09:09

    keyboardType is property for a UITextField.

    textField.keyboardType = UIKeyboardType.UIKeyboardTypeNumberPad
    

    and

    textField.keyboardType = UIKeyboardType.UIKeyboardTypeDefault
    

    is how you can switch between the two modes programatically. Hope that helps.

提交回复
热议问题