I have an app developed for iPhone with Xcode which diplays my view controllers in portrait mode with rotation activated.
there's a cell in my table view which triggers a new view controller (iPhoneSignVC) in modal mode, my question is...
is there a way to determine my new modal view controller's orientation from the very begining?? I mean... I want my new view controller to be in landscape mode and without screen rotation feature activated on that particular viewController
so far what I did was to create a new Class which overwrites UINavigation controller's class
#import "UINavigationController.h"
#import "iPhoneSignVC.h"
@implementation UINavigationController (overrides)
- (BOOL)shouldAutorotate
{
id currentViewController = self.topViewController;
if ([currentViewController isKindOfClass:[iPhoneSignVC class]])
return NO;
return YES;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
id currentViewController = self.topViewController;
if ([currentViewController isKindOfClass:[iPhoneSignVC class]]){
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
return (interfaceOrientation == UIInterfaceOrientationMaskAll);
}
@end
I tried this without success...
Thanks in advance for your support folks