Skip to content
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

Delay on SideMenuItemContent #92

Open
hakankoluacik opened this issue May 16, 2018 · 1 comment
Open

Delay on SideMenuItemContent #92

hakankoluacik opened this issue May 16, 2018 · 1 comment

Comments

@hakankoluacik
Copy link

Sometimes when i tap an item from the menu, viewcontroller comes after 4-5 second delay i don't have any idea why. Sometomes comes fast.

@lmr001
Copy link

lmr001 commented Jul 2, 2018

I have experienced the same delay. The following fixed it for me.
Change made to MenuContainerViewController.swift

    /**
     Presents left side menu.
     */
    func presentNavigationMenu() {
        if menuViewController == nil {
            fatalError("Invalid 'menuViewController' value. It should not be nil")
        }
        DispatchQueue.main.async { [weak self] in
            guard let menuViewController = self?.menuViewController else { return }
            self?.present(menuViewController, animated: true, completion: nil)
        }
        isShown = true
    }

    /**
     Dismisses left side menu.
     */
    func dismissNavigationMenu() {
        DispatchQueue.main.async { [weak self] in
            self?.dismiss(animated: true, completion: nil)
        }
        isShown = false
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants