Displaying saved reviews and photos on the Restaurant Detail screen
The Save buttons inside the Review Form and Photo Filter screens now save reviews and photos with a restaurant identifier. Now you need to configure the Restaurant Detail screen to display them. If you look in RestaurantDetail.storyboard
, you'll see that collection views have already been set up to display photos and reviews in the static table view cells. All you need to do is to implement the respective view controllers for the view and collection view cells.
You'll start with the view and collection view cells used to display reviews. Follow these steps:
- Create a new folder called
Reviews
in your project. - Right-click the folder and select New File.
- iOS should already be selected. Choose Cocoa Touch Class, and then click Next.
- Configure the file as follows:
Class:
ReviewCell
Subclass:
UICollectionViewCell
Also create XIB: Unchecked
Language:
Swift
Click Next.
- Click Create.
ReviewCell...