Pergunta

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

Foi útil?

Solução

apply affineTransform of scale .

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

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top