Do iPhone animations with CATransitions

The use of CATransition will be resulted in smoother animations, than the methods available in UIView.
Here is a push animation sample with CATransition:

CATransition* trans = [CATransition animation];
[trans setType:kCATransitionPush];
[trans setDuration:0.5];
[trans setSubtype:kCATransitionFromBottom];

// code to change the view//

[self.view.layer addAnimation:trans forKey:@"Transition"];