UITextField Should accept numbers only in iphone

前端 未结 3 1963
我在风中等你
我在风中等你 2021-01-27 14:05

UITextField have to accept the numbers only by using UITableView.

3条回答
  •  温柔的废话
    2021-01-27 14:40

    If you have textFiled available while coding, set keyboardType property of UITextField.

     textField.keyboardType = UIKeyboardTypeNumberPad;
    

    Or you can set the same with in xib file.

提交回复
热议问题