diff --git a/Pod/Classes/SideMenuManager.swift b/Pod/Classes/SideMenuManager.swift index 7b2d0a6..32fd1b7 100644 --- a/Pod/Classes/SideMenuManager.swift +++ b/Pod/Classes/SideMenuManager.swift @@ -68,7 +68,20 @@ open class SideMenuManager : NSObject { open static var menuAllowPushOfSameClassTwice = true /// 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) + open static var leftMenuWidth: CGFloat = defaultMenuWidth + open static var rightMenuWidth: CGFloat = defaultMenuWidth + + open static let defaultMenuWidth: CGFloat = max(round(min((appScreenRect.width), (appScreenRect.height)) * 0.75), 240) + + open static var menuWidth: CGFloat { + get { + return SideMenuTransition.presentDirection == .left ? leftMenuWidth : rightMenuWidth + } + set { + leftMenuWidth = newValue + rightMenuWidth = newValue + } + } /// Duration of the animation when the menu is presented without gestures. Default is 0.35 seconds. open static var menuAnimationPresentDuration: Double = 0.35