-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SASlideMenu force orientation of child view controller #102
Comments
same issue here, bump |
a workaround which couples components unluckily can be: Paste this in your AppDelegate.m
} This means that you ask the leftMenu (the part that you implement yourself) to tell you the supportedInterfaceOrientation. However, the SASlideMenuViewController does not inherit it, so you need to craft it yourself. In my case, I remember the current UINavigationController in the leftMenu and delegate the method call there. The NavigationController delegates the call to the ViewController in charge, which answers finally. It works for me. |
I have a ViewController on which I want to force orientation so I tried:
-(NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskLandscape;
}
-(BOOL) shouldAutorotate {
return NO; //also tried YES
}
return UIInterfaceOrientationLandscapeLeft;
}
This basically does nothing. All the orientations are still supported and the thing rotates. I think it's because my ViewController is embedded in several other controllers with SASlideMenu
SlideMenuRootViewController --> SASlideMenuViewController --> UINavigationController (fixed to landscape in storyboard) --> MyViewController
I don't know if this is an issue per se, I've checked SlideMenuRootViewController and SASlideMenuViewController but there's not much regarding orientation there.
The text was updated successfully, but these errors were encountered: