I have a UIScrollView in my view controller. The content size is larger than the view, so the way I’ve been editing it is by:
- Putting the scrollview on the same level in the IB hierarchy as the main view
- Resizing it, editing and making changes
- When the I need to test it out I put it back underneath the main view and resize it to fit the window. (see photos below)
This entire process is pretty time consuming and takes about a minute each time I want to change something in the scroll view.
What’s the best way to directly edit an IB built UIScrollView that is a subview of another view? There must be an easier way than the method I am using right now.


I think that’s pretty much to only way. A workaround would be to keep the UIScrollView adjacent to the main UIView and set up the hierarchy in (for example) viewDidLoad.
Just add the scrollview to the main view and set the
frameandcontentSizein code.