I have 2 GUIs and 2 controllers 1 called landscapeguitontroller and the second one called highguicontroller.
Now, as a rule, I call highguicontroller, and when I turn my iphone, it detects this, and then it shows the landscape controller: 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 a new window from the outside of the iphone into the window.
In Landscapeguicontroller, I added to the following lines:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
when I want to return to calling highguicontroller i:
[self dismissModalViewControllerAnimated:YES]
that everything works, but only in the second animation do I see the correct "rotation animation". Do you have any suggestions?
So, a short description of the problem: in the animation from high to landscape, the landscape is inserted into the window BUT in animation 2. from landscape to high, the rotation looks like a real rotation ...
, 1. 2.
Ploetzeneder