             }
             topController = topController?.presentedViewController
         }
-
+        
         if (lastMenuProtocol != nil) {
             return lastMenuProtocol
         }

        viewController.viewDidAppear(animated)
        self.contentViewController = viewController
    }

    open func showMenu(_ animated: Bool) {
        //TODO: Implement animated
        self.menuViewController?.viewWillAppear(animated)
        self.changeVisibleViewController(self.menuViewController!)
        self.menuViewController?.viewDidAppear(animated)
    }

    open func closeMenu(_ animated: Bool) {
        //TODO: Implement animated
        self.menuViewController?.viewWillDisappear(animated)

        self.menuViewController?.viewDidDisappear(animated)
        _ = self.menuViewController?.popToRootViewControllerAnimated(true)
    }
    
    open func getMenuViewController() -> PieOverlayMenuContentViewController? {
        return self.menuViewController
    }
    
    open func getContentViewController() -> UIViewController? {
        return self.contentViewController
    }
    
    open override var preferredStatusBarStyle: UIStatusBarStyle {
        return self.visibleViewController?.preferredStatusBarStyle ?? .default
    }
    
}

extension UIViewController {
    public func pieOverlayMenuContent() -> PieOverlayMenuContentViewController? {
        return self.pieOverlayMenu()?.getMenuViewController()
    }
    
    public func pieOverlayContentViewController() -> UIViewController? {
        return self.pieOverlayMenu()?.getContentViewController()
    }
    
    public func pieOverlayMenu() -> PieOverlayMenuProtocol? {
        var iteration : UIViewController? = self.parent
        if (iteration == nil) {
