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?
Asked
Active
Viewed 353 times
1 Answers
2
Put all your views in a UIScrollView
and then return the view in this delegate method of UIScrollView
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
-
Ok, but what if I have an another scrollview inside this root scrollview? Wouldn't it lead to a confusion about which scroll view is going to get scrolled? – Ufuk Can Bicici Dec 23 '12 at 15:48
-
You can give tags to UIScrollView and then this tag in this delegate method. – ask4asif Dec 23 '12 at 16:03