From af809522f3377ed0cd6a471edf5a00207fdfa264 Mon Sep 17 00:00:00 2001 From: Aryan Ghassemi Date: Sat, 27 Apr 2013 00:08:25 -0700 Subject: [PATCH] Update README.md --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fd6fd9b..3adec53 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,47 @@ iOS-Slide-Menu ============== -iOS Slide Menu \ No newline at end of file +iOS Slide Menu built on top of UINavigationController + +Setup +___________ +``` +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + LeftMenuViewController *leftMenu = [[LeftMenuViewController alloc] init]; + RightMenuViewController *leftMenu = [[RightMenuViewController alloc] init]; + + [SlideNavigationController sharedInstance].righMenu = rightMenu; + [SlideNavigationController sharedInstance].leftMenu = leftMenu; + + // Override point for customization after application launch. + return YES; +} +``` + +Switch Between ViewController +Let's say a menu item was selected +``` +SomeViewController *vc = [[SomeViewController alloc] init]; +[[SlideNavigationController sharedInstance] switchViewController:vc withCompletion:nil]; +``` +Configuring Left and Right menu for different Viewcontrollers +``` +@interface MyViewController : UIViewController +@end +``` +``` +@implementation MyViewController + +- (BOOL)slideNavigationControllerShouldSisplayLeftMenu +{ + return YES; +} + +- (BOOL)slideNavigationControllerShouldSisplayRightMenu +{ + return YES; +} + +@end +```