Hi, I am writing an application in xcode 3.2.3. All I want to do is switch to a different view, but I'm not sure how to do it. I can do this in one of these two ways ...
PreferencesViewController *screen = [[PreferencesViewController alloc]initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:screen animated:YES];
[screen release];
or using ...
PreferencesViewController *screen = [[PreferencesViewController alloc]initWithNibName:nil bundle:nil];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
[self.view addSubview:screen.view];
[UIView commitAnimations];
I have some problems with both of these methods. If I use presentModalViewController and I simulate a memory warning in PreferencesViewController, my application will shut down. This does not apply to the second method. The second way, however, makes my buttons look weird during flipping animations.
Can someone tell me what is wrong and / or advise me which method is suitable.
thank