I have a UIView in my viewcontroller. On a button click I want to show a zoom out effect of that view without changing any proportions of size. HOw to do that.

I want an effect like this

First view

On Button click

有帮助吗?

解决方案

apply affineTransform of scale .

 self.view.transform =CGAffineTransformMakeScale(.5, .5); 

Apply this transform outside viewDidLoad. enclose inside UIView animation block to animate it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top