UINavigationController custom animation

2.7k views Asked by At

Possible Duplicate:
Custom animation for pushing a UIViewController

Any of you achieved to make custom animation like expand from middle in UINavigationController? (for example Facebook app when you select news feed from the launcher view)

I seen one of trick like animating the view of the desired next controller but I am using Three20 framework and getting the next controller view is difficult.

So my only option is to play around with CATransition. I could manage to get some sort of animation that close to what I want using this piece of code.

CATransition* transition = [CATransition animation];
transition.duration = 1;
transition.timingFunction = [CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionFade;
transition.subtype = kCATransitionReveal;
[self.navigationController.view.layer addAnimation:transition forKey:kCATransition];

what it will do? It will animate fading type of animation. What I want is something like scale the view frame from CABasicAnimation.

anim.fromValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)];
anim.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)];

do you guys know how to achieve this? Something like transformation animation inside CATransition.

0

There are 0 answers