Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming
by Maurice Sharp, Erica Sadun, Rod Strougo
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access