So as of now, I just have the default MKMapView pin working. But I want a custom image to replace that little red pin. This is what I have below. What am I missing? I figured defining the view.image would do the trick, but I guess not.
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:
(id<MKAnnotation>)annotation {
MKPinAnnotationView *view = [[MKPinAnnotationView alloc]
initWithAnnotation:annotation reuseIdentifier:@"pin"];
view.enabled = YES;
view.animatesDrop = YES;
view.canShowCallout = YES;
view.image = [UIImage imageNamed:@"custom-pin-image.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage
imageNamed:@"custom-image-for-annotation.png"]];
view.leftCalloutAccessoryView = imageView;
view.rightCalloutAccessoryView = [UIButton buttonWithType:
UIButtonTypeDetailDisclosure];
return view;
}