Challenges

1. Add a new string attribute to the model called name and display it in the cars table. There are two things you need to know to make this work. First, any update to the model does not work with data created with earlier models unless you create migration code. Doing that is beyond the scope of this book. Instead, you need to delete the application and data from the simulator before running an app with a changed model. Second, to make it easier to display the name and date on the same line, you can use the Storyboard editor to change the prototype cell type from Right Detail to Subtitle. Then you can construct a string for the detail text label with the name followed by the date, in much the same way you do for the year/make/model ...

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.