how to hide the keyboard when empty area is touched on iphone
Updated way (recommended): – (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self.view endEditing:YES]; } This will end editing on all subviews and resign the first responder. Other way (enumerating over all text views): Here’s a step by step for it: Add an IBAction to your view controller, such as – (IBAction)backgroundTouch:(id)sender In the backgroundTouch action, you need … Read more