TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jul 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Madrit Kacabumi.
A Double side menu for iOS like android DrawerLayout , simple to use and customisable . Just download it and it is ready to use everything is built using panGesture recogniser;
1
MKLEGYDrawerLayout is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MKLEGYDrawerLayout"
import MKLEGYDrawerLayout
2.Declare variable (better optional)
var sideMenu : DoubleSideMenu?
// by default menus are both enabled
3.You need to create this as a view (steps for doing it in viewdidLoad)
// function avaible in extension in the library
let bundle = Bundle(identifier: "org.cocoapods.MKLEGYDrawerLayout")
// function avaible in extension in the library
sideMenu = UIView.createView(attachTo: self.view, fromBundle: bundle)
// self.view for all the view controller container or into another view
I sideMenu?.setMainContentView (view : UIView, animated : Bool = false)
//no need to add constraints , they are automatically added
II sideMenu?.addLeftMenu(view : UIView, animated: Bool = false)
III sideMenu?.addRightMenu(view : UIView, animated: Bool = false)
sideMenu?.setLeftMenuWidth(width : CGFloat)
sideMenu?.setRightMenuWidth(width : CGFloat)
// do not use negative values as the will go back to default : 280
sideMenu?.setMenuDimColor(colorHexString : "#BBBBBB")
sideMenu?.disableRightMenu()
sideMenu?.disableLeftMenu()
// OR
sideMenu?.enableRightMenu()
sideMenu?.enableLeftMenu()
sideMenu?.clearLeftMenu()
//OR
sideMenu?. clearRightMenu()
//OR
// both of them :D and anything else again
sideMenu?.closeAllMenus()
sideMenu?.closeRightSideMenu()
sideMenu?.closeLeftSideMenu()
-- to open them --
sideMenu?.openLeftSideMenu()
sideMenu?.openRightSideMenu()
sideMenu?.leftSideBarIsOpen : Bool
sideMenu?.rightSideBarIsOpen : Bool
sideMenu?.leftMenuIsEnabled : Bool
sideMenu?.rightMenuIsEnabled : Bool
Madrit Kacabumi (Mobile Developer), [email protected] or [email protected]
MKLEGYDrawerLayout is available under the GPL license , free for everyone to use :)