Skip to content

Latest commit

 

History

History

Project16

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Project 16 - Capital Cities

https://www.hackingwithswift.com/100/60

Includes solutions to the challenges.

Topics

MapKit, MKMapView, MKAnnotation, CLLocationCoordinate2D

Challenges

From Hacking with Swift:

  1. Try typecasting the return value from dequeueReusableAnnotationView() so that it's an MKPinAnnotationView. Once that’s done, change the pinTintColor property to your favorite UIColor.
  2. Add a UIAlertController that lets users specify how they want to view the map. There's a mapType property that draws the maps in different ways. For example, .satellite gives a satellite view of the terrain.
  3. Modify the callout button so that pressing it shows a new view controller with a web view, taking users to the Wikipedia entry for that city.

Screenshots

screenshot1 screenshot2 screenshot3