Skip to content

Commit

Permalink
Update MMDrawerController.m
Browse files Browse the repository at this point in the history
Applying fix from mutualmobile#204
  • Loading branch information
arielitovsky committed Mar 24, 2014
1 parent 1e42f43 commit 5ed692f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MMDrawerController/MMDrawerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfac

-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
self.startingPanRect = self.centerContainerView.frame; //
for(UIViewController * childViewController in self.childViewControllers){
[childViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
}
Expand Down

2 comments on commit 5ed692f

@JobsWang
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO,it's haven't solve the left black problem yet .

@JobsWang
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    UITabBarController *centerTabBarCtl = [[UITabBarController alloc] init];
    centerTabBarCtl.viewControllers = _viewControllers;
    centerTabBarCtl.tabBar.hidden = YES;
    UIView *transtionView = [self.centerTabBarCtl valueForKey:@"_viewControllerTransitionView"];
    transtionView.frame = [[UIScreen mainScreen] bounds];
    [self.centerTabBarCtl.view bringSubviewToFront:transtionView];

    UIViewController *leftController = [[UIViewController alloc] init];
    UINavigationController *leftNav=[[UINavigationController alloc] initWithRootViewController:leftController];

    self.drawerController = [[MMDrawerController alloc] initWithCenterViewController:centerTabBarCtl leftDrawerViewController:leftNav];
    self.drawerController.delegate = self;
    [self.drawerController setMaximumLeftDrawerWidth:224.0];
    [self.drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll];
    [self.drawerController setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll];

    self.window.rootViewController = self.drawerController;
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
    }

Please sign in to comment.