I played with MKMapView and am trying to understand how the MKMapViewDelegate system works. So far I have been unlucky in the fact that makeAddAnnotationViews is called when the current location marker is added.
I set the application delegate to implement MKMapViewDelegate, I have an Outlet for MapView in my xib and set the delegate property of MapView as self, as in the instance of delegating the application. I implemented didAddAnnotationViews in the application’s dellet, which simply NSLog calls any calls, as shown below. The map is configured to display the current location that it is doing and adds a blue pin at launch time, but for some reason AdAdAnnotationViews doesn’t hit.
- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views{ NSLog(@"Annotation added!"); }
Any ideas what I could miss?
ios objective-c mkmapview mkannotation
Benbtg
source share