I searched high and low, and I'm not sure what I went out with - this is the best way to handle this (although it seems the only one).
According to Want to use muliple nibs for different orientations of the iphone interface I applied the appropriate methods and everything seems to work fine. Unfortunately, I have to deal with the UINavigationController, and each page must support both portrait and landscape modes and reproduce the same functions in both modes. This means that if the user at some point decides to switch from portrait to landscape, the entire application should allow him to move forward and backward through the pages in the mode he selected.
Apparently, the part of the documentation that is missing is how to handle this. In my views, I have several buttons with an attached showChild method that performs navigation. As far as I know, everything works well in portrait mode (this is the default mode). The method is as follows:
- (IBAction)showChild:(UITapGestureRecognizer *)sender {
UIView *view = [sender view];
PortraitViewController *nextPortraitViewcontroller = [[PortraitViewController alloc] initWithNibName:@"Portrait" bundle:nil];
[self.navigationController pushViewController:nextPortraitViewcontroller animated:YES];
}
But when it comes to landscape mode, I get mixed results. The showChild method: in the LandscapeViewController class is exactly the same, it creates a view starting with PortraitViewController and pushes it towards the navigation controller. Everything seems to be going well, but when I go back, I get the previous portrait of the ViewController, not the landscape, as well as its sub-points spread around, not where I put them.
: Apple ( , , ), - Apple, ?