문제

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