In plist setting I’ve set only Portrait interface orientation. The whole App only needs portrait mode, except for playing youtube video (use webview controller).
In iOS 5, I can use:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
But, in iOS 6, the -(BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation method is deprecated.
Based on this article (http://fostah.com/ios/2012/09/27/ios6-orientation-handling.html); to make other orientations available throughout the app, you must override -(NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window within the app’s UIApplicationDelegate, and return UIInterfaceOrientationMaskAll:
I try to put the function into AppCoronaDelegate.mm, but it is never called.
Please advice to solve this problem.
Thanks. [import]uid: 186681 topic_id: 36080 reply_id: 336080[/import]