I\'d like to know the simplest code to dismiss the number pad keyboard when tapping anywhere outside the number pad. It\'s a simple application to input a number inside a te
You must use UITapGestureRecognizer to achieve this.
UITapGestureRecognizer *tapToDismiss = [[UITapGestureRecognizer alloc]initWithTarget: self action: @selector (dismissNumberKeyBoard:)];
Then in your dismissNumberKeyboard method,
-(Void)dismissNumberKeyboard : (id)sender {
[yourTextField resignFirstResponder];
}
Happy coding!