I am defining this method in my UITableViewController subclass:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesBegan:to
I just ran into the exact issue as the original posting. I got around the issue by creating a subclass of UITableView and overriding the "touchesBegan" method. I also created a protocol so the UITableView could call a method on the UITableViewController, which is ultimately where I wanted to handle the "touchesBegan" event.
Here is the header for UITableView subtype:
@protocol AGSTableViewDelegate;
@interface AGSTableView : UITableView
@property (nonatomic, weak) id agsDelegate;
@end
@protocol AGSTableViewDelegate
-(void)tableViewTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
@end
And implementation:
@implementation AGSTableView
@synthesize agsDelegate;
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];
if (agsDelegate)
[agsDelegate tableViewTouchesBegan:touches withEvent:event];
}
@end
And finally, the code fragments from UITableViewController:
@interface AGSWasteUpdateTableController ()
@end
- (void)viewDidLoad
{
AGSTableView *tableView = (AGSTableView *)[self tableView];
tableView.agsDelegate = self;
}
-(void)tableViewTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[yourTextField resignFirstResponder];
}
Hope this helps...