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.
Add
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}
You've got TYPO Instead of
UIInterfaceOrientationMaskLandscapeRight
you've got
UIInterfaceOrientationLandscapeRight
Check if you have checked it orientation support on your project setting. .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.