Landscape /Portrait Rotation

Discussion in 'iPhone/iPad Programming' started by Ploetzeneder, Oct 16, 2009.

  1. macrumors newbie

    Joined:
    Oct 15, 2009
    #1
    Hello,
    i have got 2 GUIs and 2 Controllers
    1 is called landscapeguicontroller and the second is called highguicontroller.

    Now generally i call the highguicontroller, and when i rotate my iphone it detects that and then it shows the landscapeguicontroller:
    Code:
    
    		landscapeguicontroller *neu =[[landscapeguicontroller alloc] initWithNibName:nil bundle:nil];
    		[self presentModalViewController:neu animated:YES];		
    		[self dismissModalViewControllerAnimated:YES];
    The Problem is that then the animation pushes the new window from the beyond side of the iphone up into the window.

    In the Landscapeguicontroller,i have added to the the following lines:
    Code:
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    	return (interfaceOrientation == UIInterfaceOrientationPortrait);
    } 
    when i want go back to the highguicontroller i call:

    [self dismissModalViewControllerAnimated:YES];

    that all works , but just in the second animation i see the correct "rotation animation".
    Have you got any suggestions?

    So a short Problem description:
    in the 1. animation from high to landscape, the landscape is pushed into the window
    BUT in the 2. animation from landscape to high, the rotation looks like a real rotation...

    i want the 1.animation look like the 2. animation

    best regards
     

Share This Page