UIViewAnimationTransitionCurlUp in landscape mode transitioning right-to-left

Posted by Thanos on Stack Overflow See other posts from Stack Overflow or by Thanos
Published on 2010-06-17T00:35:43Z Indexed on 2010/06/17 0:42 UTC
Read the original article Hit count: 719

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about animation