3

I´m developing an application for iPad & iPhone. The App is supporting on iPad all Orientations, because of Multitaskingfeatures. On iPhone my App is supporting only Portrait.

For one Specific ViewController I want on both devices to support only Landscape. On the iPhone was using following solution:

I disabled all orientations in .plist and worked with two Navigationcontroller. One for landscape and one for Portrait.

pushing my VC for Landscape:

LandscapeNavigationController *navController = [[LandscapeNavigationController alloc] init];
    [UIApplication sharedApplication].keyWindow.rootViewController = navController;
    [navController pushViewController:[Logic sharedInstance].myLandscapeViewController animated:YES];

Code in my NavigationController:

- (NSUInteger)supportedInterfaceOrientations {

    return UIInterfaceOrientationMaskLandscape;
}

- (BOOL)shouldAutorotate {
    return YES;
}

My Problem is that I cant handle the orientation on iPad in code because I have to enable all Orientations in .plist to support Multitasking. So the delegatemethods supportedInterfaceOrientations in my Navigationcontroller wont be called.

Has anybody an idea to support multitasking on iPad AND allow one specific ViewController only one supportetInterfaceOrientation?

kimbl
  • 265
  • 1
  • 2
  • 12

0 Answers0