Skip to content

LeftDrawer only in portrait mode #515

Description

@mrugeshtank

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)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions