Summary
In this chapter, you modified the Add New Journal Entry screen so that the user can add their current location to a new journal entry. Next, you created a MapViewController
class and configured it to display a custom map region centered on your location. Then, you updated the JournalEntry
class to conform to the MKAnnotation
protocol. After that, you modified the MapViewController
class to display a pin for each journal entry within the map region. You configured the pins to display callouts and configured buttons in the callouts to display the Journal Entry Detail screen when tapped. Finally, you modified the JournalEntryViewController
class to display a map snapshot for the journal entry on the Journal Entry Detail screen.
You now know how to get your device location using Apple’s Core Location framework, how to create custom map regions and display map annotations using Apple’s MapKit framework, and how to create map snapshots, which will come in handy...