UITextField Should accept number only values

前端 未结 14 1180
有刺的猬
有刺的猬 2020-12-08 09:50

I have UITexfields i want that it should accept only number other shows alert that enter a numeric value. I want that motionSicknessTextFiled should only accept number

14条回答
  •  囚心锁ツ
    2020-12-08 10:25

    Another option of entering only numeric values into your text field is by selecting the keyboard type attribute of the corresponding textfield. Attaching the screenshot for reference.

提交回复
热议问题