hey guys i have seen many similar question but could not reach to any solution. I am creating an universal app using storyboard and having a navigation controller which is having root view controller v1, so initially top view controller is v1. And on clicking a button on v1 it push view controller v2. Now i want that app should rotate in all direction for all view controllers except view controller v2. I have checked all device directions in deployment info and also tried to create category of uinavigationcontroller
#import <UIKit/UIKit.h>
@interface UINavigationController (autorotation)
-(BOOL)shouldAutorotate;
-(NSUInteger)supportedInterfaceOrientations;
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation;
@end
#import "UINavigationController+autorotation.h"
#import "AboutViewController.h"
@implementation UINavigationController (autorotation)
-(NSUInteger)supportedInterfaceOrientations
{
return [self.topViewController supportedInterfaceOrientations];
}
-(BOOL)shouldAutorotate
{
return [self.topViewController shouldAutorotate];
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return [self.topViewController preferredInterfaceOrientationForPresentation];
}
MY problem is that app is rotating for all screens but i want to stop rotation for view controller v2 as described above. I really have my two days please help me