I know that a "table view header"(the most top-part of a table view) is a View
So I try to add a UITapGestureRecognizer to it ,but it doesn't work…
code is simple :
- (void)tap:(UITapGestureRecognizer *)recognizer
{
// do something
}
UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
[self.tableView.tableHeaderView addGestureRecognizer:recognizer];
Any tips here to care ? thanks a lot
Best Answer
Here's the thing that works for me: Instead adding this:
I add gesture recognizer on every UILabel on tableview.
I hope that helps.