Rotation Portrait Landscape with 2 XIB
Posted
by Ploetzeneder
on Stack Overflow
See other posts from Stack Overflow
or by Ploetzeneder
Published on 2009-10-17T06:19:21Z
Indexed on
2010/05/27
2:31 UTC
Read the original article
Hit count: 408
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 Ploetzeneder
© Stack Overflow or respective owner