I have UiNavigationController in my app.
I want that only one screen will be able to rotate so i put in this class :
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return YES;
}
-(BOOL)shouldAutorotate {
return YES;
}
-(NSInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAll;
}
but the problem that happen is in ecery screen the app the rotation happens. how i can disable it?
For iOS 6, I am using the following code in my app, which allows you to specify rotation for each viewcontroller individually:
AppDelegate.m –
ViewController.m –
Credits for the code originially I believe go to the Ray Wenderlich “iOS 6 by Tutorials” book. Ray Wenderlich website