Skip to content

Commit

Permalink
Merge branch 'pr/77' into 2.0.3
Browse files Browse the repository at this point in the history
* pr/77:
  Comments cleanup.
  adding capability to add submenus
  • Loading branch information
jonkykong committed Sep 28, 2016
2 parents 74d1142 + 0d6d833 commit 2272074
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Pod/Classes/SideMenuManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ open class SideMenuManager : NSObject {
/// Draws the `menuAnimationBackgroundColor` behind the status bar. Default is true.
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

/// -Warning: Deprecated. Use `menuAnimationTransformScaleFactor` instead.
@available(*, deprecated, renamed: "menuAnimationTransformScaleFactor")
open static var menuAnimationShrinkStrength: CGFloat {
Expand Down
5 changes: 5 additions & 0 deletions Pod/Classes/UISideMenuNavigationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ open class UISideMenuNavigationController: UINavigationController {
return
}

if SideMenuManager.menuAllowSubmenus{
super.pushViewController(viewController, animated: true)
return
}

// to avoid overlapping dismiss & pop/push calls, create a transaction block where the menu
// is dismissed after showing the appropriate screen
CATransaction.begin()
Expand Down

0 comments on commit 2272074

Please sign in to comment.