61481

Custom MKPinAnnotationView Colours

Question:

Is it possible to define custom colours for the MKPinAnnotationView colour rather than the default red, green or purple? Docs say no...

Thanks

Answer1:

    If you want to use annotation with color different from standard ones you should create your own image. <br />     If Apple's docs say no, you should trust them - even if there's undocumented (using private api) way to do something it will likely cause your app to be rejected from app store.

Answer2:

Yep. It is possible and doesn't involve any undocumented APIs:

<a href="https://stackoverflow.com/questions/1185611/mkpinannotationview-are-there-more-than-three-colors-available" rel="nofollow">MKPinAnnotationView: Are there more than three colors available?</a>

Recommend

  • enum to store RGB strings [closed]
  • How to highlight rows if they contain duplicate data?
  • Is there a way to use “fill” AND “stroke” as attribute for regions scale colors?
  • Unexpected value returned in edit - JTree
  • Builder Factory returning different sub-interfaces
  • Colour specific node in igraph
  • Get attributes of existing SVG elements and bind as data with d3.js
  • Setting color in a row of a Jtable
  • Division with Aggregate Functions in SQL Not Behaving as Expected
  • UIButton Borders Function Only Gives Back White Borders
  • Doctrine/Symfony entity generator and generating entity from one table
  • How to split circle in to the sectors in google maps?
  • Spring: No transaction manager has been configured
  • Spring Cloud Microservice Architecture Confusion
  • Zurb Foundation _global.scss meta styles for js?
  • How to run “Deployd” on port 80 instead of port 5000 in webserver.
  • How to use carriage return with multiple line?
  • How to modify the colors in the legend of a plot using a fill gradient?
  • Sencha Touch 2.0 Controller refs attribute not working?
  • C++ Partial template specialization - design simplification
  • NHibernate Validation Localization with S#arp Architecture
  • When to use `image` and when to use `Matrix` in Emgu CV?
  • Control modification in presentation layer
  • What is the “return” in scheme?
  • How reduce the height of an mschart by breaking up the y-axis
  • Bug in WPF DataGrid
  • Why doesn't :active or :focus work on text links in webkit? (safari & chrome)
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • Which linear programming package should I use for high numbers of constraints and “warm starts” [clo
  • Redux, normalised entities and lodash merge
  • Adding custom controls to a full screen movie
  • To display the title for the current loaction in map in iphone
  • QuartzCore.framework for Mono Develop
  • RestKit - RKRequestDelegate does not exist
  • Confusion with PayPal's monthly billing cycle
  • Comma separated Values
  • Error creating VM instance in Google Compute Engine
  • Hits per day in Google Big Query
  • how does django model after text[] in postgresql [duplicate]
  • Android Google Maps API OnLocationChanged only called once