mkmapview - showsUserLocation returns pin instead of blue dot in iPhone simulator -
This is my -mapView: viewForAnnotation
method, when I create annotation view, but when I mapView.showsUserLocation = YES; If I set the
, then I get the dropped pin on the infinite loop (in the expected - simulator) and not the normal blue dot. -viewDidLoad
in
- (MKAnnotationView *) mapView: (MKMapView *) Map view view performance: (id & lt; MKAnnotation & gt;) Annotation {MKAnnotationView * anno = nil; // Create a pin annotation view MKPinAnnotationView * pin = [[[MKPinAnnotationView alloc] initWithNnotation: annotation re-user: @ "pin"] autorelease]; [Pin set pin collar: mk pin annotation collarad]; Pin.animatesDrop = Yes; Pin.canShowCallout = Yes; Pin.calloutOffset = CGExMake (-5, 5); Ano = Pin; Returns Enno; }
How can I leave pins and show blue dot?
Thanks
It's really easy to fix, even if it's unsure That is the correct way to do this ...
if (annotation == mapView .userLocation) {return zero; // default to blue dot}
Comments
Post a Comment