- I subclassed UIScrollView
- Then created an object of it in the main class.
- Added an image to it.
-
Set the zoomscales as
scrollview.minimumZoomScale = 0.25; scrollview.maximumZoomScale = 4.00;
After all this
Q. Is it supposed to zoom out when I double-tap on it and also support pinch zoom?
Q. Shouldn’t I do it programmatically?
Q. Does UIImageView or someother class support this behavious by default?
UIScrollView will not zoom unless you set the
maximumZoomScaleand/orminimumZoomScale.And return the image in
-viewForZoomingInScrollView:in your delegate. And implement-scrollViewDidEndZooming:withView:atScale:.See http://discussions.apple.com/message.jspa?messageID=8453852#8453852 for detail.