Load a Navigation ViewController from bottom

cocoa-touch, ios, iphone, uinavigationcontroller, uiviewcontroller

Solution

Try this:

CATransition *animation = [CATransition animation]; 
[animation setDuration:2]; 
[animation setType:kCATransitionPush]; 
[animation setSubtype:kCATransitionFromTop]; 
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; 
SecondView *sObj=[[SecondView alloc] initWithNibName:@"SecondView" bundle:nil];
[self.navigationController pushViewController:sObj animated:YES];
[[sObj.view layer] addAnimation:animation forKey:@"SwitchToView1"]; 

Problem

I am having four ViewControllers , where the ViewControllers are loaded using the `UINavigationController`. I am able to switch to every ViewController one by one. The thing is, since I am using the NavigationController all the ViewControllers are loaded either from the Left or from the Right. But I want to load the ViewController from the Bottom. I know I can use `presentModalViewController` to present the ViewController from the Bottom. But it is not equivalent to the Navigation Controller because , from the 4th ViewController, If I press one button , I need to come to the 1st ViewController. How can I present a ViewController from the bottom in the NavigationController ?

Original source