Reputation: 20376
I am trying to intercept the touches moved in a UITableView. My goal is to not pass through touches moving up or down on the far right hand side of the table view but to handle them for other purposes. I can track touches moving on the x plane but not on the y plane. I have subclassed both the tableview and the tableviewcells, but no success.
Any help would be appreciated please.
Upvotes: 0
Views: 623
Reputation: 39376
Put a narrow view above your UITableView. This view would be a sibling of your UITableView, but in the front. Enable user interaction on that view, and in your code, when you get a tap on that view, determine if you want to keep it or pass it on to the UITableView and otehr views below it. If you want to pass it off, you call:
[self.nextResponder touchesBegan:touches withEvent:event];
Otherwise, go ahead and handle it as you wish. Keep in mind that the right hand side of a TableView is usually where the index goes, if you've got it configured that way.
Upvotes: 2