Implementing the Review Form screen

In this section, you will implement a new view controller scene to represent the Review Form screen. Then, you will add a button to one of the table view cells in the scene representing the Restaurant Detail screen to display it. Go through the following steps:

  1. Click the Object library button and type button into the filter field. A Button object appears as one of the results. Drag it to the top static cell in the Table View Controller Scene:


  1. Position it on the right-hand side of the cell:


  1. Click the Object library button and type view con in the filter field. A View Controller object will appear as one of the results. Drag it next to the Table View Controller scene:


  1. A new View Controller scene will appear:


  1. Click the Object Library button and type label in the filter field. A Label object appears as one of the results. Drag it to the center of the new View Controller scene:


  1. Change the Label text to Reviews. Then, click the Align button:


  1. Check the Horizontally in Container and Vertically in Container checkboxes. Then, click the Add 2 Constraints button:


  1. These constraints ensure that the Reviews label will always be in the middle of the screen when the app is run, regardless of orientation or screen size:


  1. Ctrl + Drag from the Button in the Table View cell to the newly added View Controller Scene, and select Show from the pop-up menu:


Build and run the app. Click on a cell in the Explore screen, then click on a cell in the collection view. Click the button in the table view to display the Reviews screen:

Fantastic! All the screens that are accessible from the Explore tab have now been implemented, with hardly any coding required! The last thing that you have to do is make the Map screen display a map. You'll do this in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.69.255