UITextField - Allow only numbers and punctuation input/keypad

前端 未结 4 819
不思量自难忘°
不思量自难忘° 2020-12-30 10:16

I have tried the code below but that only allows for numbers on the keypad to be inputted. My app requires the keypad to use a period/full stop (for money transactions). The

4条回答
  •  無奈伤痛
    2020-12-30 10:38

    Just use

    [textField setKeyboardType:UIKeyboardTypeNumbersAndPunctuation];
    

    after creating your textfield.

提交回复
热议问题