Adding a Car View Cell

You have the data for one car and a cell to represent it, but you don’t have any view elements to display the data. The next step is to modify the prototype cell to show car data. Follow these steps:

1. Add the property dateCreated of type NSDate to the Car object. Set it to [NSDate date] in the base class initializer.

2. In the storyboard, open the Attributes inspector for the car table view cell and set it to the style Right Detail. The cell changes to show Title in black on the left and Detail in light gray on the right. Change the font size of Detail to 12 points.

You change the font size by double-clicking the detail label, showing the Attributes inspector, and then using the Font area to change the size.

3. Add a ...

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.