How to dismiss number pad keyboard by tapping anywhere
Declaring the text field as instance variable or property if it isn't already and implementing a simple method like this:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [textField resignFirstResponder];}
will do just fine.
Try this method,
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ [self.view endEditing:YES];}
Now tap anywhere and see keyboard will dismiss. :-)