views:

62

answers:

0

Hi

Im using some transitions(Flip) to switch to my "settings/about" view in my iPhone app. I initiate the transition like this:

    SettingsAboutViewController *settingsView = [[SettingsAboutViewController alloc] init];

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight
                       forView:[self.navigationController view ]
                        cache:YES];

[self.navigationController.view addSubview:settingsView.view];
[UIView commitAnimations];  

In my SettingsAboutViewController's viewDidLoad method I set up all related graphics using setFrame:CGRectMake(x, y, w, h), there is no Nib involved.

My problem is that all the graphics seems to be positioned in 0,0 and only when the flip is 90% done does it "snap" into place.

I tried calling [super viewDidLoad] after the setup and before, I tried placing my setup code inside loadView instead, but all has failed so far.

It seems the view is not all build before I call the animation. I never had problems like this before and this particular view is not graphics heavy and demanding in any other way?

What is it I need to take into account?

Thanks.