Skip to content

Instantly share code, notes, and snippets.

@DennisDreissen
Created October 23, 2015 11:29
Show Gist options
  • Select an option

  • Save DennisDreissen/9217de6bc4ecb154cdbc to your computer and use it in GitHub Desktop.

Select an option

Save DennisDreissen/9217de6bc4ecb154cdbc to your computer and use it in GitHub Desktop.
SWRevealController Snippet
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
self.revealViewController().view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
self.revealViewController().frontViewController.revealViewController().tapGestureRecognizer()
self.revealViewController().frontViewController.view.userInteractionEnabled = false
}
override func viewWillDisappear(animated: Bool) {
super.viewWillAppear(animated)
self.revealViewController().frontViewController.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
self.revealViewController().frontViewController.view.userInteractionEnabled = true
}
@luisgizirian
Copy link

super.viewWillDisappear(animated) at the second override :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment