views:

33

answers:

0

I have a view controller that is showing in portrait mode. When you touch the "menu" button, it calls the code below and it flips up to the MainMenu controller. So far, so good.

- (void) menuButton: (id) sender
{
    MainMenu_ViewController * viewController = [[MainMenu_ViewController alloc]   initWithNibName:@"MainMenu_ViewController" bundle:nil];   
    self.menuView = viewController.view;
    self.menuView.frame = self.view.bounds;
    [viewController release];

    [UIView beginAnimations:nil context: nil];
    [UIView setAnimationDuration: 1.0]; 
    [UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView: self.view cache: YES];
    [self.view addSubview: self.menuView];
    [UIView commitAnimations];  
}

However, when you do the same in landscape mode, instead of the animation flipping up (with respect to gravity, i.e. towards the long end of the iPhone) it flips towards the left (i.e. towards the short end of the iPhone).

Is this a limitation of the animation, or am I missing something?