From ef867ff2b3c8bcfc2444a97750ef2556207dc321 Mon Sep 17 00:00:00 2001 From: Jon Kent Date: Mon, 16 Oct 2017 23:18:26 -0700 Subject: [PATCH 1/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f70c72..cc66efa 100644 --- a/README.md +++ b/README.md @@ -325,7 +325,8 @@ override func prepare(for segue: UIStoryboardSegue, sender: Any?) { ``` *Important: displaying SideMenu instances directly over each other is not supported. Use `menuPushStyle = .subMenu` instead.* ## Known Issues -Don't try to change the status bar appearance when presenting a menu. When used with quick gestures/animations, it causes the presentation animation to not complete properly and locks the UI. This was fixed in iOS 9.3. See [radar 21961293](http://www.openradar.me/21961293) for more information. +* Issue #258. +* Don't try to change the status bar appearance when presenting a menu. When used with quick gestures/animations, it causes the presentation animation to not complete properly and locks the UI. This was fixed in iOS 9.3. See [radar 21961293](http://www.openradar.me/21961293) for more information. ## Thank You A special thank you to everyone that has [contributed](https://github.com/jonkykong/SideMenu/graphs/contributors) to this library to make it better. Your support is appreciated! From 646f2a8094c398b3b4f1a1e238a644826bd29a68 Mon Sep 17 00:00:00 2001 From: Jon Kent Date: Mon, 16 Oct 2017 23:18:59 -0700 Subject: [PATCH 2/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc66efa..d464fa9 100644 --- a/README.md +++ b/README.md @@ -325,7 +325,7 @@ override func prepare(for segue: UIStoryboardSegue, sender: Any?) { ``` *Important: displaying SideMenu instances directly over each other is not supported. Use `menuPushStyle = .subMenu` instead.* ## Known Issues -* Issue #258. +* Issue [#258](https://github.com/jonkykong/SideMenu/issues/258). * Don't try to change the status bar appearance when presenting a menu. When used with quick gestures/animations, it causes the presentation animation to not complete properly and locks the UI. This was fixed in iOS 9.3. See [radar 21961293](http://www.openradar.me/21961293) for more information. ## Thank You From 3dc08de6ec12896da89e5ff767d140da94fba331 Mon Sep 17 00:00:00 2001 From: Jon Kent Date: Tue, 17 Oct 2017 20:03:10 -0700 Subject: [PATCH 3/4] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d464fa9..e7a4b27 100644 --- a/README.md +++ b/README.md @@ -294,6 +294,7 @@ extension MyViewController: UISideMenuNavigationControllerDelegate { } ``` +*Note: there is no `delegate` property to set on the `UISideMenuNavigationController` for this to work. If your view controller adheres to the protocol then the methods will be called automatically.* ### Advanced For simplicity, `SideMenuManager.default` serves as the primary instance as most projects will only need one menu across all screens. If you need to show a different SideMenu, such as from a modal view controller presented from a previous SideMenu, do the following: 1. Declare a variable containing your custom `SideMenuManager` instance. You may want it to define it globally and configure it in your app delegate if menus will be used on multiple screens. From 2af0d86c97c35a76741f001cb589b3c3771c15be Mon Sep 17 00:00:00 2001 From: Andreas Hilbert Date: Thu, 19 Oct 2017 12:11:20 +0200 Subject: [PATCH 4/4] It should be possible now to have the menu slide out even if pushing the new view is not animated itself (animating both can look a bit weird when relying on 'animated' only) --- Pod/Classes/SideMenuManager.swift | 3 +++ Pod/Classes/UISideMenuNavigationController.swift | 2 +- README.md | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Pod/Classes/SideMenuManager.swift b/Pod/Classes/SideMenuManager.swift index 6112662..ad86d01 100644 --- a/Pod/Classes/SideMenuManager.swift +++ b/Pod/Classes/SideMenuManager.swift @@ -127,6 +127,9 @@ open class SideMenuManager : NSObject { */ open var menuDismissOnPush = true + /// Uses the menu dismiss animation even if pushing a view is not animated itself. + open var menuAnimateDismissOnNonAnimatedPush = 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 b7eab3a..9fd86c1 100644 --- a/Pod/Classes/UISideMenuNavigationController.swift +++ b/Pod/Classes/UISideMenuNavigationController.swift @@ -258,7 +258,7 @@ open class UISideMenuNavigationController: UINavigationController { self.dismiss(animated: animated, completion: nil) }) - if animated { + if animated || sideMenuManager.menuAnimateDismissOnNonAnimatedPush { let areAnimationsEnabled = UIView.areAnimationsEnabled UIView.setAnimationsEnabled(true) UIView.animate(withDuration: sideMenuManager.menuAnimationDismissDuration, diff --git a/README.md b/README.md index e7a4b27..9dafd23 100644 --- a/README.md +++ b/README.md @@ -224,6 +224,9 @@ of the view controller being presented in storyboard or during its initalization */ open var menuDismissOnPush = true +/// Uses the menu dismiss animation even if pushing a view is not animated itself. +open var menuAnimateDismissOnNonAnimatedPush = false + /** The blur effect style of the menu if the menu's root view controller is a UITableViewController or UICollectionViewController.