質問

Wonder how I can change the callout view of the pins, depending on my different current userLocation. The Pin stay still at some place. For example, a pin is settled at the church. If I am at home, I want the callout of the pin show message @"the distance from home to church is what what what" If I am at school, I want the callout of the pin show message @"the distance from school to church is what what what"

how can I update the callout view? which method should I use in the delegate?

役に立ちましたか?

解決

This is delegate method of MKMapView which call when you tap pins calloutbutton

- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control

and for annotationView (for view of pins ) use bellow delegate method..

- (MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation:(id <MKAnnotation>)annotation
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top