Getting started with MMDrawerController

I am trying to get MMDrawerController to work and I am having problems.

Here's how the application is structured in my storyboard:

enter image description here

This is how I try to initialize it from my root view controller:

//LCViewController.m

#import "LCViewController.h"
#import "MMDrawerController.h"

@interface LCViewController ()
  @property (nonatomic,strong) MMDrawerController * drawerController;
@end

@implementation LCViewController

- (void)viewDidLoad
{
  [super viewDidLoad];

  self.drawerController = [[MMDrawerController alloc]
                           initWithCenterViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"centerNav"]
                           leftDrawerViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"menu"]
                           rightDrawerViewController:nil];
}

...

@end

When I create my application, all I see is my root view controller. Is there anything else I have to do to implement the functionality of the box?

I created a demo project to show how I am trying to configure my application. You can download the Xcode workspace here . Thanks in advance for your help!

I am using Xcode 5 and iOS 7

+3
source share
1 answer

EDIT: , . MMDrawerController . viewDidLoad application:didFinishLaunchingWithOptions:. MMDrawerController , rootViewController UIWindow. , , .

/, :

self.drawerController.openDrawerGestureModeMask = MMOpenDrawerGestureModeAll;
self.drawerController.closeDrawerGestureModeMask = MMCloseDrawerGestureModeAll;

MMOpenDrawerGestureModeNone, . MMOpenDrawerGestureMode MMCloseDrawerGestureMode, , .

, , toggleDrawerSide: animated: completion:.

+7

All Articles