tags:

views:

40

answers:

0

Hi,

I am trying to animate my new views as they come in or go out and can't seem to figure out how to do this. I have tried several different things to no avail. Here is the code on how I load them:

 (void) displayView:(int)intNewView {
NSLog(@"%i", intNewView);

[self.currentView.view removeFromSuperview];

//[self.currentView.view removeFromSuperview];
[self.currentView release];
switch (intNewView) {
    case 1:
        self.currentView = [[FirstViewController alloc] initWithNibName:@"FirstView" bundle:nil];
        break;
    case 2:
        self.currentView = [[SecondViewController alloc] initWithNibName:@"SecondView" bundle:nil];
        break;
    case 3:
        self.currentView = [[ThirdViewController alloc] initWithNibName:@"ThirdView" bundle:nil];
        break;
    case 4:
        self.currentView = [[FourthViewController alloc] initWithNibName:@"FourthView" bundle:nil];
        break;
}

[self.view addSubview:self.currentView.view];

}

Is it even possible to have them animate when loading them this way?

As always, thanks in advance for any and all help.

Geo...