From the course: Advanced iOS App Development: MapKit & Core Location

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Customize the annotation text

Customize the annotation text - iOS Tutorial

From the course: Advanced iOS App Development: MapKit & Core Location

Start my 1-month free trial

Customize the annotation text

- [Instructor] We've set up the delegate but our pins don't do much other than turn blue. We're going to do a couple more things to get these a little bit more entertaining and interesting in terms of what they can do. One thing we can do is customize the callout but before we do, we need to turn it on. Go ahead and close the app and go back to our delegate and so in the map view, view for annotation. Under where it says pinTintColor I want you to add another line. AnnotationView and we have another property we're going to follow, and this is true of all annotation views, is canShowCallout. Set that to true. Its default is false, which is why we weren't seeing anything. We can go ahead and put that in there, run again, click the Naples pin, and all of a sudden, we're getting stuff. There we have it. There's more we can do with this callout, with the title and the subtitle. There are actually three views in the callout itself. One is on the left, one is on the right, and one is on the…

Contents