문제

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