-
Notifications
You must be signed in to change notification settings - Fork 819
Enabling pan gesture even on underLeftViewController #98
Comments
I have the same question - asked about the same time you asked and will really appreciate if someone can answer us this #97 |
In my MenuViewController, I added this line and it did the trick: self.slidingViewController.shouldAllowUserInteractionsWhenAnchored = YES; |
It doesn't work for me, one thing that I would like to understand should I create a new instance of view controller every time you click on a menu item, can I create a singleton instance for each menu item view controller and every time user clicks on a menu item set the singleton instance of that view controller as the topViewController. |
You can save all viewControllers to array or dictionary on first call. And then only assign topViewVontroller to one of them on menu item click. |
Hello utiko, Yes that's what I am doing, but when I assign each of the viewController to topViewController first time they are ok but as soon as I assign them the second time I loose the panning gesture. One each of my controller viewDidLoad I am doing Some how I am suspecting that when I am re assigning one of the viewController to the topViewController, this panGesture is gtting messed up. |
I have tried the code suggested above by andrew-soltan
here the StackOverFlow question: http://stackoverflow.com/questions/17453345/activate-pan-gesture-on-menucontroller-using-ecslidingviewcontroller |
I was able to do this by adding a pan gesture to the menu view controller and setting it's target/action to the sliding view controller's pan gesture. See https://github.com/edgecase/ECSlidingViewController/tree/gh-98 |
In facebook application (used as instance), if I pan the the controller that in our case we call topViewController to reveal the underLeftViewController I can bring the topViewController back even by sliding outside of him (which is in that case anchored), in other words even by swiping on the underLeftController.
I'd like to implement that mechanism, is this somehow possible?
I notice that if I assign the pan gesture to my underLeftController somehow it begins to work that way (even if with some gimmicks), but after I bring my topViewController back it has lost the pan gesture.
I thought that, by playing with notifications, I could assign and the assign the pan gesture to the right controller but it sounds tricky and not so clean, is there a better way I'm not noticing?
The text was updated successfully, but these errors were encountered: