zaheer
zaheer

Reputation: 893

Orientation not changing on device

I have supported both LandscapeLeft and landscapeRight directions

-(NSUInteger)supportedInterfaceOrientations
{

     return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationLandscapeRight;
}

But the orientation is not changing for landscapeRight. I have added observer to detect the orientation change events, those events are being called but the statusBar and navigation bar do not change for landscapeRight mode.

Upvotes: 0

Views: 66

Answers (3)

Andrei Shender
Andrei Shender

Reputation: 2497

You've got TYPO Instead of

UIInterfaceOrientationMaskLandscapeRight

you've got

UIInterfaceOrientationLandscapeRight

Upvotes: 1

oxigen
oxigen

Reputation: 6263

Add

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}

Upvotes: 1

rptwsthi
rptwsthi

Reputation: 10172

Check if you have checked it orientation support on your project setting.Setting for project orientation support.

Upvotes: 0

Related Questions