Skip to content

publickanai/PLMSideMenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PLMSideMenu

[![CI Status](http://img.shields.io/travis/tatsuhiro kanai/PLMSideMenu.svg?style=flat)](https://travis-ci.org/tatsuhiro kanai/PLMSideMenu) Version License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

import PLMSideMenu module.

import PLMSideMenu

Define your Navigation Controller class with PLMSideMenuNavigationController.

class MainNavigationController: PLMSideMenuNavigationController, PLMSideMenuDelegate , UINavigationControllerDelegate
{

Setup SideMenu

override func viewDidLoad()
{
    super.viewDidLoad()
    
    // set UINavigationControllerDelegate
    self.delegate = self
    
    // setup SideMenu
    self.setupSideMenu()
}

/** Setup SideMenu
*/
private func setupSideMenu()
{
    // init with parent view of the sidemenu and menu view controller
    self.sideMenu       = PLMSideMenu( sourceView : self.view , menuViewController : MenuViewController(), menuPosition:.Right)
    sideMenu?.delegate  = self // optional, PLMSideMenuDelegate
    sideMenu?.menuWidth = 180.0 // custom SideMenu Width, default is 160
    //sideMenu?.allowSwipeOpen = true

    // make navigation bar showing over side menu
    view.bringSubviewToFront(navigationBar)
}

Requirements

Installation

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

pod "PLMSideMenu"

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod "PLMSideMenu"

Then, run the following command:

$ pod install

Author

tatsuhiro kanai, kanai.tatsuhiro@adways.net

License

PLMSideMenu is available under the MIT license. See the LICENSE file for more info.