Frage

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

War es hilfreich?

Lösung

apply affineTransform of scale .

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

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top