Summary
In this chapter, you replaced the table view in the Journal List screen with a collection view, which makes better use of the extra screen space available when you run your app on an iPad or Mac. You also made your app dynamically modify the number of columns and the collection view cell sizes when your device is rotated using size classes.
First, in the Main
storyboard file, you replaced the table view in the Journal List screen with a collection view and configured the collection view cell to display the same information the table view cell used to display. Next, you modified the JournalListTableViewController
and JournalListTableViewCell
classes to work with the collection view and collection view cells. After that, you added code to dynamically change the collection view cell size to suit the display your app is running on. Finally, you created and tested your app on Simulator and your Mac.
You should now be able to use collection views in your app and know how...