ipup / PPRevealSideViewController

A new container controller to easily push views on side like Path or Facebook
www.ipup.pro
Other
821 stars 194 forks source link

panGesture on contentView when sidebar opened #57

Closed zhugexiaobo closed 11 years ago

zhugexiaobo commented 11 years ago

hi, I have a tableView on my contentView and each tableViewCell has panGesture.When the left side viewController opened,I can still do the panGesture on the contentView,that's kind of odd. So how can I keep the tapGesture enable to close the left side VC and disable the panGesture on the contentView. btw I hidden the navigationBar for some reason.Thanks :)

josipbernat commented 11 years ago

Hi, If I understood you correctly you have centerViewController that has UITableView in which each cell has panGestureRecognizer? I had similar problems like that, but it is not a problem of PPRevealSideViewController, you need to disable touches by your self. Here is one example how you can do it:

In centerViewController add this:

In example you need to observe your contentViewController.view.frame and when frame changes that means that your PPRevealSideViewController is moving your contentViewController. When that happens you just need to disable touches on your tableView and your tapGestureRecognizer will collect touches.

zhugexiaobo commented 11 years ago

That's helpful.Thanks for the good solution.