ENSwiftSideMenu

A lightweight flyover side menu component for iOS with the UIDynamic's bouncing animation, UIGestures and UIBlurEffect. Allows you to use native UINavigationController's logic to manage view controllers. The component is written in Swift.

ENSwiftSideMenu

Requirements

  • Xcode 6.3 or higher
  • iOS 8 or higher

Installation

CocoaPods

The recommended way for installating ENSwiftSideMenu is via the CocoaPods package manager

platform :ios, '8.0'
pod 'ENSwiftSideMenu', '~> 0.1.1'

Manual Install

All you need is import ENSideMenu.swift and ENSideMenuNavigationController.swift to your project folder.

Usage Example

  1. Create a root UINavigationController subclassing from ENSideMenuNavigationController
  2. Create a UIViewController for your side menu
  3. Initilize the menu view with a source view and menu view controller:
override func viewDidLoad() {
  super.viewDidLoad()
  sideMenu = ENSideMenu(sourceView: self.view, menuViewController: MyMenuViewController(), menuPosition:.Left)
  // show the navigation bar over the side menu view
  view.bringSubviewToFront(navigationBar)
}
  1. To change content view controller use next line in your menu view controller:
sideMenuController()?.setContentViewController(destViewController)
  1. Check example project for more explanation

GitHub