I am defining this method in my UITableViewController subclass:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesBegan:touches withEvent:event];
NSLog(@"touch began");
}
but it's not being triggered. UIViewController is a subclass of UIResponder so it should work, right? Thanks
If you are trying to dismiss a keyboard in a UITableViewController, a decent solution is to call resignFirstResponder in the tableView delegate's didSelectRowAtIndexPath method.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[myTextField resignFirstResponder];
// Rest of your actual didSelectRowAtIndexPath code ...
}