Skip to content
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

LeftDrawer only in portrait mode #515

Open
mrugeshtank opened this issue Sep 25, 2018 · 0 comments
Open

LeftDrawer only in portrait mode #515

mrugeshtank opened this issue Sep 25, 2018 · 0 comments

Comments

@mrugeshtank
Copy link

I'm having an application which can be used in the landscape also.
But left menu should be used in portrait mode only. So center view can be rotated to either landscape left or landscape right.
I wrote below code in LeftMenu, but it is also preventing Centerview to being rotated.

-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
    if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)){
        [[UIDevice currentDevice] setValue: [NSNumber numberWithInteger:UIInterfaceOrientationPortrait] forKey:@"orientation"];
    }
}

How can I achieve this (leftmenu should be in portrait only while centerView can be used in landscape and portrait)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant