简体   繁体   中英

Scrollview and Side menu with Pan Gesture Conflict

I am designing a App in swift which contains Left Side out Menu. I had used Navigation Controller for Recognizing Pan depending on which I am toggling Left Side Out menu.

Below is code for attaching pan gesture with navigation controller

let panGestureRecognizer = UIPanGestureRecognizer(target: self, action: "handlePanGesture:")
    centerNavigationController.view.addGestureRecognizer(panGestureRecognizer)*

In other controllers it is working fine, but in controller where there is Scroll view I want that after scroll view is scrolled till content offset 0 and further scrolled on left side it should open up left side out menu. but it prevents calling pan gesture.

It is conflicting.

I have tried number of solutions using method

func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool {}

But it didn't worked.

Please let me know if any additional info required for defining problem.

Thanks in advance.

https://github.com/John-Lluch/SWRevealViewController

Use SwrevealviewController ,you will get all those things

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