endo.anaconda
endo.anaconda

Reputation: 2468

iPhone mapKit annotation for Current Location

Im currently strugglung with annotations. how can i prevent the AnnotationLable for the blue GPS-point. (Here is an Image)

- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(MKAnnotation *) annotation{


 if (annotation == mapView.userLocation) { 
  return nil;
 }

the function above isnt working, and i realized that i can't compare two coordinates.

Any hint is welcome. Simon

Upvotes: 0

Views: 2581

Answers (1)

Nick
Nick

Reputation: 8493

You are comparing an annotation to a location in your if.

Are you trying to supress the current location annotation for a reason? It is common UI with map kit and the consistency helps users understand the blue dot.

Upvotes: 1

Related Questions