diff --git a/Pod/Classes/SideMenuManager.swift b/Pod/Classes/SideMenuManager.swift index 5dda49d..09d821b 100644 --- a/Pod/Classes/SideMenuManager.swift +++ b/Pod/Classes/SideMenuManager.swift @@ -127,6 +127,9 @@ open class SideMenuManager : NSObject { */ open var menuDismissOnPush = true + /// Forces menus to always animate when appearing or disappearing, regardless of a pushed view controller's animation. + open var menuAlwaysAnimate = false + /// Default instance of SideMenuManager. open static let `default` = SideMenuManager() internal var transition: SideMenuTransition! diff --git a/Pod/Classes/UISideMenuNavigationController.swift b/Pod/Classes/UISideMenuNavigationController.swift index 61a93fb..d2cf67e 100644 --- a/Pod/Classes/UISideMenuNavigationController.swift +++ b/Pod/Classes/UISideMenuNavigationController.swift @@ -267,6 +267,8 @@ open class UISideMenuNavigationController: UINavigationController { // is dismissed after showing the appropriate screen CATransaction.begin() if sideMenuManager.menuDismissOnPush { + let animated = animated || sideMenuManager.menuAlwaysAnimate + CATransaction.setCompletionBlock( { () -> Void in activeDelegate?.sideMenuDidDisappear(menu: self, animated: animated) if !animated {