Update README.md

This commit is contained in:
Aryan Ghassemi 2013-04-27 00:08:25 -07:00
parent 42d6964205
commit af809522f3
1 changed files with 44 additions and 1 deletions

View File

@ -1,4 +1,47 @@
iOS-Slide-Menu
==============
iOS Slide Menu
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 <SlideNavigationControllerDelegate>
@end
```
```
@implementation MyViewController
- (BOOL)slideNavigationControllerShouldSisplayLeftMenu
{
return YES;
}
- (BOOL)slideNavigationControllerShouldSisplayRightMenu
{
return YES;
}
@end
```