I am having problem in implementing the device orientation methods. I am implementing it as
follows
-(BOOL)shouldAutorotate{
return TRUE;
}
-(NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskAll;
}
In tha appdelegate I am doing
self.window.rootViewController = self.splitViewController;
I want my app to work for all the orientations . But none of the orientation is working
properly.Any help ? My app is targeted IOS 4.3 , but it should also work for IOS 5 and 6 as well.
First of all, in AppDelegate, write this. THIS IS VERY IMP
Also, A lot depends on with which controller is your UIViewController embedded in.
Eg, If its inside UINavigationController, then you might need to subclass that UINavigationController to override orientation methods like this.
subclassed UINavigationController (the top viewcontroller of the hierarchy will take control of the orientation.) needs to be set it as self.window.rootViewController.
From iOS 6, it is given that UINavigationController won’t ask its UIVIewControllers for orientation support. Hence we would need to subclass it.