Getting started with reviews
First, we are going to set up the UI for our Reviews section. By doing this, we can then focus strictly on coding. Earlier in this book, we set up the screens for when we have reviews and for when we do not. Now, we need to have two more screens: one for creating reviews and the other for reading reviews.
Setting up our table view controllers
Each of these new screens will be inside of a Table View Controller. Therefore, we need to set up the Table View Controllers:
- Open the
RestaurantDetail.storyboard
in the Navigator panel; and then, in the Object library of the Utilities panel, typeview
into the filter field. - Drag out one Table View Controller and one View Controller into the scene.
- In the Outline view, find the Table View Cell that contains the No Reviews container and the Reviews Container we created earlier:
- Open up the disclosure arrows for both Views. You should see the Read All Reviews button in the top View with the Reviews container and the Add a Review...