I have a 3d model rendered in a UIView. When I pinch the model it zooms correctly, but when zoomed in I'd like the ability to pan/scroll the view so that I can see the parts of the model which are outside the boundaries of the view. I switched the UIView to a UIScrollView, and on the pinch event is update the content size with the scale factor. This works great and I can now scroll the view. My problem is that panning to th开发者_C百科e outer edges of the content view still shows the 3d model still clipped at the size of the initial view. I hope this makes sense...
Does anyone have an idea what might be needed to render the zoomed in parts of the chair, which should now be visible (after panning)?
I was able to get this working after setting the UIView.bounds as well as the UIScrollView content size. That is, the scrollview contained a uiview, which contained the 3d model. I was resizing the scrollview, but not the uiview. They both needed to be set in order for this to work.
精彩评论