Search code examples
iosmkannotation

How to get map annotation title in this method


i want to get annotation title & subtitle from this method. what the way go get that.

-(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view{
//NSString * title = [annotations title];
}

Solution

  • The view has an annotation property that you can use which will return the annotation you originally used when creating the view.