Skip to content

Latest commit

 

History

History

day-061

Day 61: Project 16: Capital Cities, Part Two

Follow along at https://www.hackingwithswift.com/100/61.

📒 Field Notes

This day covers the second and final part of Project 16: Capital Cities in Hacking with Swift.

I previously created projects alongside Hacking with Swift in a separate repository, and you can find Project 16 here. Even better, though, I copied it over to Day 60's folder so I could extend it for 100 Days of Swift.

With that in mind, Day 61 focuses on extending the project with a set of challenges.

🥅 Challenges

Challenge 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.

Challenge 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.

Challenge 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