iOS orientation behavior on a landscape only iOS application
I am developing a landscape only application for the iPhone.
I have selected all 4 orientation on my Xcode project settings and I
narrowed down my application's orientation in the main view controller by
using the following delegate methods:
- (NSUInteger) supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeRight;
}
-
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return NO;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeRight;
}
Everything works as expected, except for the main iOS behavior: I want iOS
to be able to show the Notification Center, the Alerts and the Control
Center from below (on iOS 7 devices) by respecting the device orientation,
without rotating my application interface each time.
For example: When I hold my phone on portrait mode I want everything on
iOS (Notification Center, alerts etc) to be presented in portrait mode
with my app staying on Landscape Right mode.
Is that feasible?
As far as I know Apple does that in their applications, such as the
default Camera app.
Is there a public method I can use to achieve that or is it part of a
private API?
No comments:
Post a Comment