EMSideMenu 1.0.1

EMSideMenu 1.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Nov 2016

Maintained by Elliott Minns.



  • By
  • Elliott Minns

A configurable side menu for iOS

Requirements

  • Xcode 5 or higher
  • Apple LLVM compiler
  • iOS 7.0 or higher
  • ARC

Installation

Manual Installation

All you need to do is drop 'EMSideMenu' files into your project, and add #include "EMSideMenu.h" to the top of classes that will use it.

Example Usage

Create a view controller which inherits from EMSideMenu, this will act as the container for the content and the menu. That's all for a basic use case!

To change or add a new view as the current content view one of two methods.

- (void)replaceContentWithView:(UIView *)newView;

This will add the newView parameter to the content view or

- (void)replaceContentWithViewController:(UIViewController *)newController;

which will take the view property for the newController and set it as the content view, this also adds the viewController as a child view controller to the EMSideMenu.

To add the Side Menu to the container add it as a subview to the EMSideMenu's attribute or replace it entirely, example:

 [self.sideMenuContainer addSubview:menuViewController.view];

To show or hide the SideMenu, call the toggle menu method of the sideMenu.

[self toggleMenu];

Other properties

  • Shadow - This is toggled using the shadowOn property. Does what it says on the tin.