前言
我已经使用 MKMapView 和 MapAnnotation 实现了地图注释。当点击标题视图时,如下图所示。
我使用以下 LOC 来实现所述地图注释:
// VENUE 1 PIN.
CLLocationCoordinate2D venue1Location = CLLocationCoordinate2DMake(-27.5, 153.5);
MapAnnotation *venue1Pin = [[MapAnnotation alloc] initWithTitle:@"1 ONE ST" Location:venue1Location];
查看注解委托方法:
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation
{
if ([annotation isKindOfClass:[MapAnnotation class]])
{
MapAnnotation *venueLocationAnnotation = (MapAnnotation *)annotation;
MKAnnotationView *venueLocationAnnotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:@"customAnnotation"];
venueLocationAnnotationView.rightCalloutAccessoryView.hidden = YES;
if (venueLocationAnnotationView == nil)
venueLocationAnnotationView = venueLocationAnnotation.annotationView;
else
venueLocationAnnotationView.annotation = annotation;
return venueLocationAnnotationView;
}
else
{
return nil;
}
}
问题
如何从上述地图注释标题视图中删除信息按钮?