Add supporting of different left and right menu width
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user