Lars Christoffersen
Lars Christoffersen

Reputation: 1739

UIView with UITableView as subview

I have a UIView with a UITableView as subview. When I add a gesture recogniser to the view, my "table did select row" is not triggered anymore, but the gesture recogniser is always triggered? I have tried to remove the gesture recogniser from the tableview, but it has no effect.

let viewRecognizer = UITapGestureRecognizer(target: self, action: "handleTap")
viewRecognizer.delegate = self
self.view.addGestureRecognizer(viewRecognizer)
//This has no effect!
orderTableView.removeGestureRecognizer(viewRecognizer)

Upvotes: 0

Views: 114

Answers (1)

LJ Wilson
LJ Wilson

Reputation: 14427

Have you set the cancelsTouchesInView to NO for the UIView?

See documentation

Upvotes: 2

Related Questions