Closed schmidt9 closed 8 years ago
I updated PBRevealViewController to allow tap gesture to be recognize on the main view when userInteractionEnabled is false (v. 1.0.5).
Then use the delegate methods:
func revealController(revealController: PBRevealViewController!, didShowLeftViewController controller: UIViewController!) {
revealController.mainViewController.view.userInteractionEnabled = false
}
func revealController(revealController: PBRevealViewController!, didHideLeftViewController controller: UIViewController!) {
revealController.mainViewController.view.userInteractionEnabled = true
}
func revealController(revealController: PBRevealViewController!, didShowRightViewController controller: UIViewController!) {
revealController.mainViewController.view.userInteractionEnabled = false
}
func revealController(revealController: PBRevealViewController!, didHideRightViewController controller: UIViewController!) {
revealController.mainViewController.view.userInteractionEnabled = true
}
Thanks for quick fix!
Hello, If I tap outside of left view going to hide it and the finger lands on a button in main VC, the button triggers unwanted tap event. How to disable touch events in main VC until left view goes away?