Check if NSString "000001XX"is a number with intValue
- by Kenny
Now I am trying to add a front end check on my app to detect if user input only number in the textfield.
I use:
- (IBAction)checkID:(UITextField *)sender {
if ([sender.text isEqualToString:@""]) {
sender.text = @"This information is required";
sender.backgroundColor =[UIColor redColor];
}else if (![sender.text intValue]) {
sender.text…