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
UITableViewCellinstance and assign it as the identity for thejournalCelltable view cells. - Modify the
JournalListViewControllerclass to get sample data from thecreateSampleJourneyEntryDatastatic method and assign it to ajournalEntriesarray. - Modify the data source methods in the
JournalListViewController...