質問

I was trying to add a pinch gesture zoom-in zoom-out feature to a UITextView and then I decided that adding a pinch gesture which zooms the whole screen, covering the whole view hierarchy is a better and more general solution. But I am confused about how to do it: Should I change the frame sizes of all UIView objects or should I somehow scale them? What is the most correct way to do it?

役に立ちましたか?

解決

Put all your views in a UIScrollView and then return the view in this delegate method of UIScrollView

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top