I am trying to replace a typical "pin" iOS-mapkit with a specific image. I am new to coding, so I'm not sure why this is not working, but here is what I tried:
for method
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation {
I have, among other things, the following:
pinView.animatesDrop=YES; pinView.canShowCallout=YES; //pinView.pinColor=MKPinAnnotationColorPurple; UIImage *pinImage = [UIImage imageNamed:@"Jeff.png"]; [pinView setImage:pinImage];
However, although the code compiles fine, pinView does not set pinImage. Any ideas why not?
source share