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
UITableViewCellinstance and assign it as the identity for thejournalCelltable view cells. - Modify the
JournalListViewControllerclass to get sample data from an instance of theSampleJourneyEntryDatastructure. - Modify the data source methods in the
JournalListViewControllerclass to populate...