Updating restaurant details
If you click on a restaurant and go to a restaurant detail page, you should see something similar to the following screenshot:
We have some Auto Layout elements that are missing. Let's fix these elements so that they appear correctly on an iPad.
Updating the header layout
First, we need to fix the header information section:
We want a gray background and the Labels to expand across the screen and the logo to be in the middle:
- Open
RestaurantDetail.storyboard
and, in theRestaurantDetailViewController
, select the View container that contains the header information: - Select the Pin icon and enter the following values:
- All values under Add New Constraints are set to 0
Constrain to margins: unchecked
Update Frames: Items of New Constraints
- All values under Add New Constraints are set to 0
- Click on Add 4 Constraints.
- Next, select the logo in the View container and, then, the Pin icon. Enter the following values:
- Under Add New Constraints:
Top:
10
Constrain to margins: unchecked
Width:
220
(checked)Height:
112
(checked)
- Under Add New Constraints:
- Click...