I’m using this sample code to view a PDF in my iPhone app:
However, the problem is I can’t seem to get it to be drag initially. I can pinch and zoom initially, and after I’ve zoomed once, then I can drag the view around just fine. I just can’t drag when the view first loads.
Any ideas?
I think I’ve figured out a solution, though why this doesn’t just work is beyond me. If you set the zoomScale property, it seems to trigger whatever is needed to allow dragging and scrolling to take place, even if you set the property to 1, which does nothing.
I just did this in the initWithFrame: method of the UIScrollView:
If anyone else knows of any better or more correct way to do this, or has an explanation for why this happens, I’d like to know.