I hope someone can help… This issue has been discussed here and I have tried the solutions suggested but to no avail.
My problem is best illustrated using the example project which can be downloaded from this URL:
http://www.hitsalive.com/tmp/VCTest.zip
In the example project I have a main UIViewController with two buttons used to call two other UIViewControllers – one using presentModalViewController and the other using “addSubView” (using the AppDelegate). Individually both buttons and UIViewControllers work fine.
However, if I first call the modal viewcontroller, then dismiss it (using dismissModalViewControllerAnimated: YES) and then display the second (addSubView) UIViewController, then all elements and subviews in the second UIViewController (such as the button in the example) get displaced downwards vertically by 20 pixels. And the displacement happens with a momentary delay.
This issue does not happen with SDK 3.2 and below — just iOS4.
Any help would be appreciated, especially with reference to the example project above.
add
[aViewControllerTwo setWantsFullScreenLayout:YES];to your- (void)flipToViewControllerTwoafterViewControllerTwo *aViewControllerTwo = [[ViewControllerTwo alloc] initWithNibName:@"ViewControllerTwo" bundle:[NSBundle mainBundle]];