[![CI Status](http://img.shields.io/travis/tatsuhiro kanai/PLMSideMenu.svg?style=flat)](https://travis-ci.org/tatsuhiro kanai/PLMSideMenu)
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)
}
PLMSideMenu is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "PLMSideMenu"
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
tatsuhiro kanai, kanai.tatsuhiro@adways.net
PLMSideMenu is available under the MIT license. See the LICENSE file for more info.