阅读背景:

检查NSString是否为有效数字 - 整数或十进制数

来源:互联网 

I have an iOS app with a UITextField that allows the user to enter a number in. How can I ensure that the value the user types in is a valid number (either whole or decimal). Here is what I have tried, but for some reason it won't work for decimal numbers: that allow




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: