Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 29th, 2012  |  syntax: None  |  size: 0.29 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. change annotation image after its created
  2. //carAnnotation is your id<MKAnnotation> object
  3. MKAnnotationView *av = [mapView viewForAnnotation:carAnnotation];
  4. if (carAnnotation.isMoving)
  5.     av.image = [UIImage imageNamed:@"moving.png"];
  6. else
  7.     av.image = [UIImage imageNamed:@"stopped.png"];