From 52960fac95902f2bd323f4cd88755cbc80b72123 Mon Sep 17 00:00:00 2001 From: agates4 Date: Fri, 20 Jan 2017 18:50:04 -0500 Subject: [PATCH] updated readme and fixed indentation issues --- Pod/Classes/SideMenuManager.swift | 2 +- README.md | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Pod/Classes/SideMenuManager.swift b/Pod/Classes/SideMenuManager.swift index d4f231c..15c1d28 100644 --- a/Pod/Classes/SideMenuManager.swift +++ b/Pod/Classes/SideMenuManager.swift @@ -61,7 +61,7 @@ open class SideMenuManager : NSObject { - menuDissolveIn: The menu dissolves in over the existing view controller. */ open static var menuPresentMode: MenuPresentMode = .viewSlideOut - + /// Prevents the same view controller (or a view controller of the same class) from being pushed more than once. Defaults to true. open static var menuAllowPushOfSameClassTwice = true diff --git a/README.md b/README.md index 6f5ba69..cf7faa9 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,18 @@ That's it. ### Customization Just type `SideMenuManager.menu...` and code completion will show you everything you can customize (defaults are shown below for reference): ``` swift +/** +The push behavior of the menu. + +There are six modes in MenuPushBehavior: +- defaultBehavior: The view controller is simply pushed into the stack. +- popWhenPossible: Pops to any view controller already in the navigation stack instead of the view controller being pushed if they share the same class. +- preserve: Retrieves each already created view controller to front when called. +- preserveAndHideBackButton: Retrieves each already created view controller to front when called, and hides the back button. +- replace: Releases the current view controller and pushes the new view controller. +*/ +open static var menuPushBehavior: MenuPushBehavior = .defaultBehavior + /** The presentation mode of the menu. @@ -130,15 +142,9 @@ There are four modes in MenuPresentMode: */ open static var menuPresentMode: MenuPresentMode = .viewSlideOut -/// Retrieves each already created view controller to front when called. Disables navigation back button. Defaults to false. -open static var menuPreserveViewOnPush = false - /// Prevents the same view controller (or a view controller of the same class) from being pushed more than once. Defaults to true. open static var menuAllowPushOfSameClassTwice = true -/// Pops to any view controller already in the navigation stack instead of the view controller being pushed if they share the same class. Defaults to false. -open static var menuAllowPopIfPossible = false - /// Width of the menu when presented on screen, showing the existing view controller in the remaining space. Default is 75% of the screen width. open static var menuWidth: CGFloat = max(round(min((appScreenRect.width), (appScreenRect.height)) * 0.75), 240) @@ -187,9 +193,6 @@ open static var menuFadeStatusBar = true /// When true, pushViewController called within the menu it will push the new view controller inside of the menu. Otherwise, it is pushed on the menu's presentingViewController. Default is false. open static var menuAllowSubmenus: Bool = false -/// When true, pushViewController will replace the last view controller in the navigation controller's viewController stack instead of appending to it. This makes menus similar to tab bar controller behavior. -open static var menuReplaceOnPush: Bool = false - /** The blur effect style of the menu if the menu's root view controller is a UITableViewController or UICollectionViewController.