Adding a Scroll View to the View/Edit Scene

The easiest way to set up a scroll view is to put all the content you want to scroll in one view. This new view becomes the scroll views content view. For the add/view scene, you need a UIView that contains the add car area, separator view, and view car area. Effectively this means the view of the UIViewController is the content view. But you cannot just drag in a scroll view and make it the root view of the view/add scene controller.

That leaves two choices. First, you can add a scroll view as a child of the root view and then add a UIView as a child of the scroll view and move all the content areas (add car, separator, and view car) into that new child. Unfortunately, you also have to redo all the ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.