Skip to main content

Wrap up

About 1 minSwiftiOSArticle(s)bloghackingwithswift.comcrashcourseswiftxcodeappstoreios

Wrap up 관련

Hacking with iOS – learn to code iPhone and iPad apps with free Swift tutorials

Learn Swift coding for iOS with these free tutorials – learn Swift, iOS, and Xcode

Wrap up | Hacking with iOS

Wrap up

I tried to keep this project as simple as possible so that you can focus on the map component, because there was a lot to learn: MKMapView, MKAnnotation, MKPinAnnotationView, CLLocationCoordinate2D and so on, and all must be used before you get a finished product.

Again, we've only scratched the surface of what maps can do in iOS, but that just gives you more room to extend the app yourself!


Review what you learned

Anyone can sit through a tutorial, but it takes actual work to remember what was taught. It’s my job to make sure you take as much from these tutorials as possible, so I’ve prepared a short review to help you check your learning.

Review – Project 16: Capital Cities – Hacking with Swift

Interactive tests that help gauge your progress learning Swift

Challenge

One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try your new knowledge to make sure you fully understand what’s going on:

  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.

이찬희 (MarkiiimarK)
Never Stop Learning.