After struggling for a few hours, finally i can make this work..
First, you need to create a subview of ECSLidingViewController
and put this code:
-(NSUInteger)supportedInterfaceOrientations{
return [self.topViewController supportedInterfaceOrientations];
}
-(BOOL)shouldAutorotate{
return self.topViewController.shouldAutorotate;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
return [self.topViewController preferredInterfaceOrientationForPresentation];
}
You also need to create a category of UINavigationController
and override this code
@implementation UINavigationController (Rotation_IOS6)
-(BOOL)shouldAutorotate{
return [[self.viewControllers lastObject] shouldAutorotate];
}
-(NSUInteger)supportedInterfaceOrientations{
return [[self.viewControllers lastObject] supportedInterfaceOrientations];
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
return [[self.viewControllers lastObject] preferredInterfaceOrientationForPresentation];
}
@end
Hope this work for you..