All Articles

MKPinAnnotationView Custom Pin Colors

One of the common questions most developers ask when it comes to MKPinAnnotationView is are there more than 3 colors as listed in the enumeration MKPinAnnotationColor (Red, Green, Purple)?

Well yes there is. Look no further, as Nic Hubbard under the GitHub user @nnhubbard has created ZSPinAnnotation. The purpose of ZSPinAnnotation is to expand MKPinAnnotationView to accept any color possible! Amazing stuff, but I still felt limited. Specifically for my app, I was looking to do multiple palette colors represented via one MKPinAnnotationView as the image shown below.

…and much more…

Through much research, I was able to map all of the core colors in UIColor to MKPinAnnotationView pin colors. Download below and feel free to do whatever you want to do with them.

I’m @steventsooo on Twitter. I would love to hear what you think!

Published 4 Jun 2015