Question

In my iOS application, I've image view. I added pinch & zoon and move (left right top and left) functionality to it. What I am looking is: I want to implement save functionality so that when I visit the same page again, it must show the same zoom scale and position of image. And later I must be able to zoom/move to different scale and save it. I didn't understand which parameter do I've to save. so that I can retrieve it back. Can any one give me some suggestion....?

Was it helpful?

Solution

This shouldn't bee too rough, I'm assuming your imageview is inside of a ScrollView (for all of its pinching and zooming help). If so you can simply store the contentOffset and contentScaleFactor when the user stops viewing the image, then reapply it when they view it again.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top