Question

I'm currently using ECSlidingViewController in my app. As default behaviour, it's possible to show the side menu (MenuViewController or underRightViewController) panning on the top view or calling the RevealMenu: method. I extended this functionality giving the user the possibility to pan the top view controller back adding this line to the UnderLeftViewController ViewDidLoad method:

self.slidingViewController.shouldAllowUserInteractionsWhenAnchored = YES;

(source here)

Here the limitations:

  1. User must touch the top view on the side to pan it back,touching the MenuController cell won't have any effect. If you look at the Facebook iOS you will notice it's possible to pan the top view starting the gesture in the middle of the side tableviews.
  2. adding the above line of code will disable the TapRecogniser previously active on the top view (and I would need it to work at the same time of the Pan recogniser).

Does anybody know how to implement this behavior?

Was it helpful?

Solution

Ok, I might have found a work around for the tap recogniser problem, instead of the previous line insert this one in your side menu view controller

self.slidingViewController.shouldAddPanGestureRecognizerToTopViewSnapshot = YES;

still it's not possible to swipe on the menu view though,but at least I have swipe and tap events working on the top view once is on the side.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top