Passing location and cuisine information to the RestaurantListViewController instance
At present, you’re able to set a location in the Locations screen and have that location appear in the collection view section header of the Explore screen. Now, you will add code so you can pass the location and cuisine values to the RestaurantListViewController
instance, which will then display the restaurants at the selected location that offer the selected cuisine. You’ll also make the checkmark next to your selected location reappear if you have selected a location in the Locations screen earlier. Follow these steps:
- You’ll add identifiers for each segue connected to the Explore screen so that you know which segue is occurring later. Open the
Main
storyboard file and click the Explore View Controller Scene.Select the segue between Explore View Controller Scene and the Location View Controller Scene:
Figure 18.11: Editor area showing segue between...