MapKit을 사용하고 있으며 정확한 문제가 있습니다. 내가 않도록 옆에 핀이 아닌 파란색 버튼을 볼 수 있습니다,이 코드에서MKMapViewDelegate를 설정하면 IOS에서 내 마커가 사라집니다.
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation {
static NSString *identifier = @"MyLocation";
if ([annotation isKindOfClass:[MyLocation class]]) {
MKAnnotationView *annotationView = (MKAnnotationView *) [mymap_ios dequeueReusableAnnotationViewWithIdentifier:identifier];
if (annotationView == nil) {
annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:identifier];
annotationView.enabled = YES;
annotationView.canShowCallout = YES;
} else {
annotationView.annotation = annotation;
}
annotationView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
return annotationView;
}
return nil;
}
:
이 내 코드입니다. 이 작업을 잊어 버린 것 같습니다.
그러나이 값을 추가하면 마커가 전혀 표시되지 않습니다.
저를 도와 줄 수 있습니까?