views:

26

answers:

1

Hello - 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 viewcontroller with two buttons used to call two other UIViewControllers - one using "presentModalViewController" and the other using "addSubView" (using the AppDelegate). Individually both buttons and viewcontrollers work fine.

However, if I first call the modal viewcontroller, then dismiss it (using "dismissModalViewControllerAnimated: YES") and then display the second (addSubView) viewController, then all elements and subviews in the second viewcontroller (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.

A: 

add [aViewControllerTwo setWantsFullScreenLayout:YES]; to your - (void)flipToViewControllerTwo after ViewControllerTwo *aViewControllerTwo = [[ViewControllerTwo alloc] initWithNibName:@"ViewControllerTwo" bundle:[NSBundle mainBundle]];

GameBit
Thanks GameBit. That does work but with that solution you get strange artifacts just as the viewcontroller displays - the text in the "Dismiss" button shifts slightly after the viewcontroller comes into view, and the text in the TextView controller initially (momentarily) displays as a black dot in the top left-hand corner.
declan