MKPointAnnotation: The title is always displayed. Is it possible?

My code for adding marker and title is as follows:

MKPointAnnotation *annotationPoint = [[MKPointAnnotation alloc] init]; annotationPoint.coordinate = coord; annotationPoint.title = currentTitle; [mapView addAnnotation:annotationPoint]; 

Is it possible to display the title on the marker immediately after showing the marker and always visible? Many thanks

+4
source share
1 answer
 MKPointAnnotation *annotationPoint = [[MKPointAnnotation alloc] init]; annotationPoint.coordinate = coord; annotationPoint.title = currentTitle; [mapView addAnnotation:annotationPoint]; [mapView selectAnnotation:annotationPoint animated:NO]; 

OR

 - (void)mapView:(MKMapView *)map didAddAnnotationViews:(NSArray *)views{ for (MKAnnotationView *av in views){ if ([av.annotation isKindOfClass:[MKPointAnnotation class]]){ [mapView selectAnnotation:av.annotation animated:NO]; break; } } } 
+10
source

All Articles