Reputation: 4905
I have one view controller, where i have two buttons. Clicking on one button, i'll show an UIView (size: 900 * 600) programmatically. Right now, this view comes just like that clicking on that button action. But, i want to have this view coming as if kind of "zoom in" animation and show to the user, and when user closes this view, it will go like "zoom out" and removed from parent view.
Could you please suggest me, how i can achieve this animation?
Thanks.
Upvotes: 0
Views: 2365
Reputation: 28727
The property transform
is animatable.
So create CGAffineTransformMakeScale with destination scale factor, and set the
view.transform = scaleTransform;
inside the animation block.
Upvotes: 1