2

Is it possible to add an extra property to MKPointAnnotation? At the moment there is coordinate, title, and subtitle.

Is it possible to add a url property which can be accessed within -(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation{ }, just like I can access[annotation title];?

Undo
  • 25,519
  • 37
  • 106
  • 129
Josh Boothe
  • 1,413
  • 4
  • 25
  • 40

1 Answers1

5

Just make an MKPointAnnotation subclass.

Delete all the methods out of the .m file, and add this to your .h file:

@property (nonatomic, strong) NSURL *url;
Undo
  • 25,519
  • 37
  • 106
  • 129