Programmatically change UITextField Keyboard type

前端 未结 12 1323
不知归路
不知归路 2020-11-28 19:28

Is it possible to programmatically change the keyboard type of a uitextfield so that something like this would be possible:

if(user is prompted for numeric i         


        
12条回答
  •  不知归路
    2020-11-28 19:39

        textFieldView.keyboardType = UIKeyboardType.PhonePad
    

    This is for swift. Also in order for this to function properly it must be set after the textFieldView.delegate = self

提交回复
热议问题