From af809522f3377ed0cd6a471edf5a00207fdfa264 Mon Sep 17 00:00:00 2001 From: Aryan Ghassemi Date: Sat, 27 Apr 2013 00:08:25 -0700 Subject: [PATCH 1/2] 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 +``` From 8679f33b322e479c12113d9afb9d2ee805b66c17 Mon Sep 17 00:00:00 2001 From: Aryan Ghassemi Date: Sat, 27 Apr 2013 00:09:39 -0700 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3adec53..42eb431 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ___________ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { LeftMenuViewController *leftMenu = [[LeftMenuViewController alloc] init]; - RightMenuViewController *leftMenu = [[RightMenuViewController alloc] init]; + RightMenuViewController *righMenu = [[RightMenuViewController alloc] init]; [SlideNavigationController sharedInstance].righMenu = rightMenu; [SlideNavigationController sharedInstance].leftMenu = leftMenu; @@ -35,7 +35,7 @@ Configuring Left and Right menu for different Viewcontrollers - (BOOL)slideNavigationControllerShouldSisplayLeftMenu { - return YES; + return YES; } - (BOOL)slideNavigationControllerShouldSisplayRightMenu