Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swipe gesture for centerview? #39

Closed
TimE90 opened this issue Jun 5, 2013 · 4 comments
Closed

Swipe gesture for centerview? #39

TimE90 opened this issue Jun 5, 2013 · 4 comments

Comments

@TimE90
Copy link

TimE90 commented Jun 5, 2013

Hello!

Thanks for this great drawer controller!

I use a swipe gesture in my center view to go one page back.
After setting the gesture delegate to "self" and allowing "shouldRecognizeSimultaneouslyWithGestureRecognizer" the page goes back but also opens the leftside menu.

At this point it only should go one page back. How to permit the menu to open?

Best Regards
Tim

@kcharwood
Copy link
Contributor

Hey @TimE90,

I would actually think that from a user experience perspective, you wouldn't want both a left to right swipe and left to right pan to be available on the same screen. Seems like it would be very easy for a user to do the "wrong" thing in that case, and not understand why.

I would recommend disabling the center view pan open gesture in that case, or at a minimum change it to the bezel pan.

@TimE90
Copy link
Author

TimE90 commented Jun 5, 2013

Look at your mails.. I think you misunderstood a little bit. Sorry.

@kcharwood
Copy link
Contributor

Hey @TimE90,

I think I understood you. In the case of the Facebook example it looks like you can pan open the drawer from the second view controller only if you do a bezel pan.

Here is what I would recommend:

In viewWillAppear: of the second view controller, I would set the openGestureModeMask to not include the pan center view and include the bezel pan. In viewWillAppear: of the first view controller, I would reset it to the default state.

You should have access to the drawer controller from the children view controllers by calling self.mm_drawerController (as long as you import the category).

I'm also working on a feature in #25 that would give you even more control of exactly when the gestures should be recognized. Feel free to take a look and see if that solves your use case as well.

@rheza
Copy link

rheza commented Jun 6, 2013

You are correct, self.mm_drawerController can set open/close GestureModeMask to none. it should be able to prevent leftside menu to be opened from detailview.. and set again open open/close GestureModeMask to open left side of view on the root view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants