Open moostafaa opened 7 years ago
Use the delegate method:
func revealControllerPanGestureShouldBegin(_ revealController: SWRevealViewController!) -> Bool {
return true // or false
}
thanks for response but how can I understand which segue is called sw_rear or sw_right? I implemented this delegate
func revealControllerPanGestureShouldBegin(_ revealController: SWRevealViewController!) -> Bool {
let velocity = revealController.panGestureRecognizer().velocity(in: revealController.view).x
if velocity < 0 {
print("Direction: Left (Should open right view)")
}
else {
print("Direction: Right (Should open rear view)")
}
}
I solved this by getting gesture direction, thanks for you help.
I have two segue in my code one for sw_rear and one for sw_right, i need to disable one of them in particular situation, Is it possible? if yes how can should I do it? at this time I disabled pan gesture recognizer so my users have to open reveal view by selecting menu buttons, using this technique I am able to hide or show right or left menu on the fly. but I need to enable pan gesture in my app.