1
votes

I wonder if UIScrollView has got an "hidden" subview acting as an container for the content. If I scroll a scroll view, is that content view moved up/down in the scroll view? Or is the scrolling offset applied to the bounds of that UIScrollView instance?

Or: Does UIScrollView use an additional view as container, or is all content added directly to the view? The documentation doesn't tell much about wether it has a content container or not.

1

1 Answers

2
votes

UIScrollView doesn't have a content container but it is standard practice to create one yourself and add all your subviews to it. It's not necessary, though, at least as long as you use the scroll view just for scrolling. If you need the zooming functionality, too, having one content view often simplifies things because the delegate method viewForZoomingInScrollView: requires you to return a single view.