TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Nov 2016 |
Maintained by Elliott Minns.
A configurable side menu for iOS
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.
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];