How to remove non numeric characters from phone number in objective-c?

前端 未结 5 650
不思量自难忘°
不思量自难忘° 2021-01-01 19:05

This is my first attempt to make an ios app.

I\'m using people picker to ask the user for a phone number, but when it retrieves with the code below, my NSStrin

5条回答
  •  时光说笑
    2021-01-01 19:48

    I would use Regular expression to validate the phone number instead of killing myself to make a custom keyboard, which functions can be changed by iOS updates. So, allow all characters and validate inside the code.

提交回复
热议问题