-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close revealviewcontroller when tapped on the page #821
Comments
Override touchesBegan is not needed! Reading the documentation in the .h file: class MainViewController: UITabBarController, SWRevealViewControllerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
self.revealViewController().tapGestureRecognizer()
self.revealViewController().panGestureRecognizer()
// ... And the rear view will be closed automatically. |
I just tried this didn't work. I have a UINavigationController as front not UITabBarController and TableViewController as rear |
It was an example. Just call revealViewController().tapGestureRecognizer in your main view controller. |
I actually did that but still doesn't work. Just one thing the front page the whole view is google map where user taps. Can that be an issue? Here is my current code: `import UIKit
|
I am using swift and xocde 12. And I am using TableViewController for the menu. I have tried following solutions but they didn't work.
`override func touchesBegan(_ touches: Set, with event: UIEvent?) {
if let touch = touches.first {
if self.revealViewController() != nil {
self.view.addGestureRecognizer(self.revealViewController().tapGestureRecognizer())
}
}
`if self.revealViewController() != nil {
The text was updated successfully, but these errors were encountered: