Iphone – View Animations

iphone

I am looking for a way to animate a view transition when using the following code to switch between views:

BuildCard2ViewController *aViewController = [[BuildCard2ViewController alloc] initWithNibName:@"BuildCard2" bundle:nil];

self.view = [aViewController view];

I don't have a navigation controller in the application to manage the cool transitions, looking for a way to fit into the above.

Thanks in advance!

Best Answer

Start with the Animating Views section of the iPhone Application Programming Guide. View transitions have good sample code in ViewTransitions.

You're also leaking the view controller above. Since the view controller manages the view, you're going to need to hold it in an ivar for the lifespan of the view so you can release it when you're done with the view.