Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions SASlideMenu/SASlideMenu/SASlideMenuRootViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,36 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInte
}
}

- (BOOL) shouldAutorotate {
if (self.leftMenu && [self.leftMenu respondsToSelector:@selector(shouldAutorotate)]) {
return [self.leftMenu shouldAutorotate];
}
return YES;
}

- (UIInterfaceOrientation) preferredInterfaceOrientationForPresentation {
if (self.leftMenu && [self.leftMenu respondsToSelector:@selector(preferredInterfaceOrientationForPresentation)])
return [self.leftMenu preferredInterfaceOrientationForPresentation];
return UIInterfaceOrientationPortrait | UIInterfaceOrientationPortraitUpsideDown | UIInterfaceOrientationLandscapeLeft | UIInterfaceOrientationLandscapeRight;
}

- (NSUInteger) supportedInterfaceOrientations {
if (self.leftMenu && [self.leftMenu respondsToSelector:@selector(supportedInterfaceOrientations)]) {
return [self.leftMenu supportedInterfaceOrientations];
}

return UIInterfaceOrientationMaskAll;
}

- (BOOL) prefersStatusBarHidden {
if (self.leftMenu && [self.leftMenu respondsToSelector:@selector(prefersStatusBarHidden)]) {
return [self.leftMenu prefersStatusBarHidden];
} else if (self.rightMenu && [self.rightMenu respondsToSelector:@selector(prefersStatusBarHidden)]) {
return [self.rightMenu prefersStatusBarHidden];
}
return NO;
}

-(void) viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
}
Expand Down