In my Application one of the ViewController is need to be supported from portrait to landscape/landscape to portrait, and remains support to portrait only I achieved this in Xcode 4.6 with iOS 6 but when I run my code in Xcode 5 with iOS 7 those methods are not being called. Is there any methods deprecated in iOS 7. If yes what are those methods?
I have created a sub class for UINavigationController and below is the my code which is working fine in iOS 6.
-(BOOL)shouldAutorotate
{
return [[self.viewControllers lastObject] shouldAutorotate];
}
-(NSUInteger)supportedInterfaceOrientations
{
// return [[self.viewControllers lastObject] supportedInterfaceOrientations];
return [[self topViewController] supportedInterfaceOrientations];
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return [[self.viewControllers lastObject]
preferredInterfaceOrientationForPresentation];
}
Please help me. Thanks in advance.