                                            else: { _ in Menu.elseCondition(.leftSide) } )
 
     private weak var _sideMenuManager: SideMenuManager?
-    private weak var foundDelegate: UISideMenuNavigationControllerDelegate?
+    private weak var foundViewController: UIViewController?
     private weak var interactionController: SideMenuInteractionController?
     private var interactive: Bool = false
     private var originalBackgroundColor: UIColor?


    weak var activeDelegate: UISideMenuNavigationControllerDelegate? {
        guard !view.isHidden else { return nil }
        return sideMenuDelegate ?? foundDelegate ?? findDelegate(forViewController: presentingViewController)
    }

    func findDelegate(forViewController: UIViewController?) -> UISideMenuNavigationControllerDelegate? {
        if let navigationController = forViewController as? UINavigationController {
            return findDelegate(forViewController: navigationController.topViewController)
        }
        if let tabBarController = forViewController as? UITabBarController {
            return findDelegate(forViewController: tabBarController.selectedViewController)
        }
        if let splitViewController = forViewController as? UISplitViewController {
            return findDelegate(forViewController: splitViewController.viewControllers.last)
        }

        foundDelegate = forViewController as? UISideMenuNavigationControllerDelegate
        return foundDelegate
    }

    func setup() {

        // Dismiss keyboard to prevent weird keyboard animations from occurring during transition
        presentingViewController?.view.endEditing(true)

        foundViewController = nil
        activeDelegate?.sideMenuWillAppear?(menu: self, animated: animated)
    }
    
