Getting Data into Table Views
In the previous chapter, you learned about the Model-View-Controller (MVC) design pattern and table views. You also reviewed the table view in the Journal List screen. At this point, the Journal List screen displays cells that do not contain any data. As shown in the app tour in Chapter 10, Setting Up the User Interface, it should display a list of journal entries.
In this chapter, you’re going to implement the model objects for the Journal List screen to make it display a list of journal entries. You’ll start by learning about model objects that you will use. Next, you’ll create a Swift class that can store journal entry instances. After that, you’ll create a structure with an array property containing sample journal entry instances. This array will then be used as the data source for the table view in the Journal List screen.
By the end of this chapter, you’ll have learned how to create model objects, how to...