- 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开发者_StackOverflow社区 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 maximumZoomScale
and/or minimumZoomScale
.
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.
精彩评论