Beginning iOS 10 Programming with Swift

Chapter 17
Working with Maps

The longer it takes to develop, the less likely it is to launch.

-Jason Fried, Basecamp

The MapKit framework provides APIs for developers to display maps, navigate through maps, add annotations for specific locations, add overlays on existing maps, etc. With the framework you can embed a fully functional map interface into your app without any coding.

In iOS 9 or later, the MapKit framework allows developers to provide pin customization, transit and flyover support. We will go over some of these features with you. In particular, you will learn a few things about the framework:

  • How to embed a map in a view and table view footer
  • How to translate an address into coordinates using Geocoder
  • How to add and customize a pin (i.e. annotation) on map
  • How to customize an annotation

To give you a better understanding of the MapKit framework, we will add a map feature in the FoodPin app. After the change, the app will bring up a map when a user taps the address of a restaurant, and pin its location on the map.

Cool, right? It's gonna be fun. Let's get started.

Want to learn more about Swift 3 and build a real world app with maps? Get a full copy of the book here.