Populating the Scroll View

So far, you have created content views using IB. Now you create the content view in code. In this case, the content view is a UIView with a number of UIImageView children. In a real app, the images would probably be pictures taken with the camera. In this app, the images are the car pictures you added to the project.

Set the content of CarImageViewController.m to the code in Listing 6-3.

Listing 6-3 Initial Code for CarImageViewController

// //  CarImageViewController.m //  CarValet #import "CarImageViewController.h" @implementation CarImageViewController {     NSArray *carImageNames;                                                   // 1 } - (void)setupScrollContent {     NSMutableArray ...

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.