I have a large image, size around 30000 (w) x 6000 (h) pixels. You may consider it's like a big map. I assume I need to crop it up into smaller tiles. Questions:
- what are the right
ViewControllers
to use? - (link) what is the tile strategy? (I put this in another question, as it's not iPhone specific)
Requirements:
- whole image (though cropped) can be scrolled up/down/left/right by swipes
- zoom in (up to pixel-to-pixel) out (down to screen-fit-by-height) by the 2-finger operation
- memory efficiency by lazy loading tiles
Bonus requirements:
- automatic scroll, say from left to right slowly and smoothly
Thanks!
Check out part 3 of Apple's ScrollViewSuite sample code for an example of how to do this.
来源:https://stackoverflow.com/questions/2726336/how-to-scroll-and-zoom-in-out-large-images-on-iphone