5
votes

I have a UIScrollView loaded with a UIImageView, so that the user can zoom in, and then scroll if necessary. However, if the image is larger than the screen, scrolling doesn't do anything until the user pinches to zoom (even just one pixel). For example, the image might be 320 x 600, so they see a section 320 x 480, but would have to scroll to see the rest. However, the scrolling wouldn't work until they zoomed in or out. Is there any way to avoid this?

2

2 Answers

7
votes

Have you called -setContentSize: on the scroll view? If you haven't, it won't know that there is offscreen content to display.

3
votes

Was stuck on this problem for almost a whole day. In the far right window, click on the far left button like soscreenshot

Then uncheck the "Use Autolayout"