Latest 0.2.1
Homepage https://github.com/devMadrit/MKLEGYDrawerLayout
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

MKLEGYDrawerLayout

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;

MKLEGYDrawerLayout

Features

  • [x] Double side menu (left and right)
  • [x] Enable or disable one of menus (or both)
  • [x] add content (both menus) with just one line of code (constraints auto added)
  • [x] change size , colors , dim colors etc
  • [x] Movements offset

    Requirements

    1

    Installation

MKLEGYDrawerLayout is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MKLEGYDrawerLayout"

Usagge :

  1. import library
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)

  1. declare bundle
    // function avaible in extension in the library
    let bundle = Bundle(identifier: "org.cocoapods.MKLEGYDrawerLayout")
  2. create view

    // 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 
  3. add view into it now (create a xib or a view controller in the story board add it into the main container or side menus ( they are just views)

     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)
  4. ENJOY !

Customisation :

  1. width by default is 280 , but you can change it for both of them
  sideMenu?.setLeftMenuWidth(width : CGFloat)
  sideMenu?.setRightMenuWidth(width : CGFloat)
  // do not use negative values as the will go back to default : 280
  1. every time you open one of menus lets suppose the left one , the Main Cointainer will have a black color with alpha 0.3 (Dim), to change the color simply

    sideMenu?.setMenuDimColor(colorHexString : "#BBBBBB")
  2. if you need to disable any menu or if any is disabled and you want to enable (by default are both enabled) simply

     sideMenu?.disableRightMenu()
     sideMenu?.disableLeftMenu()
     // OR
     sideMenu?.enableRightMenu()
     sideMenu?.enableLeftMenu()
  3. if during app running you need to change content then

    sideMenu?.clearLeftMenu()
     //OR  
    
     sideMenu?. clearRightMenu() 
     //OR 
     // both of them :D   and anything else again
  4. if you need to open or close programatically menus then

    sideMenu?.closeAllMenus()
    sideMenu?.closeRightSideMenu()
    sideMenu?.closeLeftSideMenu()
    
    -- to open them --
    
    sideMenu?.openLeftSideMenu()
    sideMenu?.openRightSideMenu()
    1. additional data only for check , NOTE : use only for direct check NOT changing !!
     sideMenu?.leftSideBarIsOpen : Bool
     sideMenu?.rightSideBarIsOpen : Bool
    
     sideMenu?.leftMenuIsEnabled : Bool
     sideMenu?.rightMenuIsEnabled : Bool

Author

Madrit Kacabumi (Mobile Developer), [email protected] or [email protected]

License

MKLEGYDrawerLayout is available under the GPL license , free for everyone to use :)

Latest podspec

{
    "name": "MKLEGYDrawerLayout",
    "version": "0.2.1",
    "summary": "Android drawer layout for ios , just two sidemenus using panGesturesRecogniser",
    "description": "Android drawer layout for ios , just two side-menus using panGesturesRecogniser. Simple to use , read documentation here : https://github.com/devMadrit/MKLEGYDrawerLayout . ENJOY !!",
    "homepage": "https://github.com/devMadrit/MKLEGYDrawerLayout",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "devMadrit": "[email protected]"
    },
    "source": {
        "git": "https://github.com/devMadrit/MKLEGYDrawerLayout.git",
        "tag": "0.2.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MKLEGYDrawerLayout/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This