简体   繁体   中英

MMDrawerController pan gesture behaviour when center controller has Scroll View

I'm looking for help from someone who have used MMDrawerController .

I've downloaded example project and it has a table view as a center view controller. Pan gesture works correctly - it starts to open the drawer only if the gesture is mostly horizontal. Drawer does not open when you scroll table view. This is the desired behavior for me.

But when I set up my own project and there's scrollView or tableView - scrolling them up and down opens the drawer if the scrolling gesture has even the slightest horizontal component which is confusing and barely usable.

I've tried to understand what makes the difference in the example project looking through code, but with no success. I didn't find any gesture recognizer callback overrides or anything like that what is changing the gesture behavior.

I've looked through threads on SO considering MMDrawerController , but didn't find anything similar.

I do know that I can override some things in MMDrawerController subclass to change the gesture recognition completely and probably achieve desired behavior this way, but I don't want to reinvent the wheel here. Probably there is some easy answer that I overlooked.

I've found the origin of my problem. It has nothing to do with the MMDrawerController. In my project, I had a category which implements gestureRecognizer delegate's method which de facto overrides implementation in all ViewControllers. I should use subclass instead of a category in this case, this was a very bad design.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM