dogo / AKSideMenu

Beautiful iOS side menu library with parallax effect. Written in Swift
MIT License
281 stars 50 forks source link

AKSideMenu doesn't open when using the app for the first time #74

Closed Z1Z0 closed 4 years ago

Z1Z0 commented 4 years ago
Include the following:

When any user tries to open the app for the first time AKSideMenu doesn't I can't click the navigation button to make it open, he should close the app and open it again to make it work.

My code from SceneDelegate:

guard let windowScene = (scene as? UIWindowScene) else { return }

    if Auth.auth().currentUser != nil {
      // User is signed in.
        window = UIWindow(frame: windowScene.coordinateSpace.bounds)
        window?.windowScene = windowScene
        let navigationController = UINavigationController(rootViewController: HomeViewController())
        let leftMenu = SideMenuTableViewController()
        let sideMenuViewController = AKSideMenu(contentViewController: navigationController, leftMenuViewController: leftMenu, rightMenuViewController: nil)
        sideMenuViewController.delegate = self
        window?.rootViewController = sideMenuViewController
        window?.makeKeyAndVisible()
    } else {
        // No user is signed in.
        window = UIWindow(frame: windowScene.coordinateSpace.bounds)
        window?.windowScene = windowScene
        let nav = UINavigationController(rootViewController: SplashViewController())
        window?.rootViewController = nav
        window?.makeKeyAndVisible()
    }

Did I make anything wrong?