Adding the Custom Cell Visual Elements

With the row height set, you have enough room to add the visual elements. To lay out the cell, you need the car placeholder image for the cell, which you can find in the sample code for this chapter. Follow these steps:

1. Choose the Images.xcassets item in Xcode and add the CH10 Assets Placeholder folder included with the sample code for this chapter. You should have one item with two images.

2. Add a UIImageView to the container view and set the image to placeholder.

3. Use the alignment constraint popup to vertically center it in the container (though do not update frames yet).

4. Now, use the pin constraint popup to set the leading edge constraint to the standard distance and the width and height to ...

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.