Using data from JSON files in your app

Let's review how the app works. In the Explore screen, the user will tap the LOCATION button and select a location such as Charleston, NC on the Locations screen. After a location has been selected, the user taps Done and will be returned to the Explore screen. The user will then select a cuisine in the Explore screen, and a list of restaurants in that location that offer that cuisine will be displayed in Restaurant List screen. Tapping a restaurant will display the details of said restaurant in the Restaurant Detail screen.

In the Map screen, the user will see all the restaurants near the user's location. Tapping a restaurant will display a callout bubble, and tapping the button in the callout button will display the details of said restaurant in the Restaurant Detail screen.

So, you will do the following:

  • Configure LocationViewController to store the location selected by the user.
  • Pass the selected location to ExploreViewController.
  • Configure ExploreViewController to pass the selected location and cuisine to RestaurantListViewController.
  • Configure RestaurantListViewController to get a list of restaurants from a JSON file corresponding to the selected location.
  • Configure MapViewController to get a list of restaurants from a JSON file based on the user's location.
  • Configure RestaurantListViewController to display a list of restaurants based on the location and cuisine selected.

This may seem daunting, so you'll do things step by step. To start, you'll configure LocationViewController so it can store the location selected by the user. 

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

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