I am having 2 scrollviews which have imageviews inside it,
Following is the hierarchy, View -- ScrollView -- UIImageView -- Image
I have added pinch to zoom functionality, so that the user can zoom in,zoom out the image.
Now, while flipping the scrollview, if the image has been zoomed and i flip the view to backscrollview, i want the image to be reset to its original position.
How do I do that?
You could use the UIScrollView delegate method:
scrollViewWillBeginDragging
. This tells you when a scrolling is going to begin. At this point you can reset the zoom and the position:(swift code but similar in objc)