UIScrollView doesn't pan until after zoom user action?

I had the exact same problem! Found the answer in this post and adapted it to iOS.

Up vote 1 down vote favorite 1 share g+ share fb share tw.

I have a UIScrollView containing a UIView in Interface Builder. In the running application, even though the view is larger than the scrollView, when I pan the scrollView, it always bounces back to the origin. Until, that is, I zoom the scrollView with a pinch gesture.

Afterwards the panning leaves the contained view in a correct state. Am I missing some setting about pan/zoom in the scrollView, or a contentOffset setting? I cannot figure out what changes about the scroolView from before zooming to after zooming that makes it work as desired after but not before.

Anyone who has solved this issue, thank you! Uiscrollview link|improve this question asked Oct 3 '10 at 2:07SG162.

I had the exact same problem! Found the answer in this post and adapted it to iOS. Basically, make sure you are setting the delegate and zoomScales in this order: scrollView.

Delegate = self; scrollView. MinimumZoomScale = 0.1; scrollView. MaximumZoomScale = 4.0; scrollView.

ZoomScale = 1.0; Then it should work!

I walked away from this for a few days and have been revisiting it this weekend but still have not figured out what variable is changing. It seems like the scrollView "remembers" that the content origin is in the top left until the view's size changes. However, changing the contentSize manualy before loading doesn't seem to trigger the correct behavior.

Will keep posted.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions