Displaying data in a table view
In Chapter 14, Getting Started with MVC and Table Views, you used a table view cell configuration to set the data to be displayed by the table view cells. You will not be able to do the same here because you are using a custom table view cell that you implemented in Chapter 13, Modifying App Screens.
So far in this chapter, you’ve implemented a static method that returns an array containing three JournalEntry
instances. You will now modify the JournalListViewController
class to use that array as the data source for the table view on the Journal List screen. To do so, you will do the following:
- Create a custom
UITableViewCell
instance and assign it as the identity for thejournalCell
table view cells. - Modify the
JournalListViewController
class to get sample data from thecreateSampleJourneyEntryData
static method and assign it to ajournalEntries
array. - Modify the data source methods in the
JournalListViewController
...