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 structure that creates three JournalEntry
instances and assigns them to the journalEntries
property. 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 an instance of theSampleJourneyEntryData
structure. - Modify the data source methods in the
JournalListViewController
class to populate...