To represent restaurant locations on the Map screen, you will create a class, RestaurantItem, that conforms to MKAnnotation. When RestaurantItem objects are added to a map view, the delegate object (usually a view controller) of the map view will automatically provide MKAnnotationView, which appears as a pin, on the map view.
You need the location of the restaurant so that you can set the coordinate property of the RestaurantItem instance. The restaurant location data will be provided as a .plist file. Before you create the RestaurantItem class, you need to import the .plist file containing the restaurant details into your app. Do the following steps:
- Open the LetsEat project. In the Project navigator, right-click ...