0
注释查看气泡大小太小9次满10次。 我打电话[self.mapView selectAnnotation:self.selectedVenue animated:YES];
选择一行时显示注释视图。我是否设置了animated:
YES
或NO
它仍然显示错误的大小。不过,如果我将地图视图高度的大小增加到200像素,除了地图视图对于3.5英寸屏幕太大,一切看起来都不错。标题和副标题正确MKPinAnnotationView无法正常显示
图片:。https://dl.dropboxusercontent.com/u/5105730/anno.png
以下是我创造我的注解视图
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation{
if ([annotation isKindOfClass:[FSVenue class]]) {
static NSString *PlaceAnnotationIdentifier = @"Place Identifier";
MKPinAnnotationView *annotationView = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:PlaceAnnotationIdentifier];
if (annotationView == nil) {
annotationView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:PlaceAnnotationIdentifier];
}
annotationView.annotation = annotation;
UIButton *calloutButton = [UIButton buttonWithType:(UIButtonTypeContactAdd)];
calloutButton.tintColor = self.themeColor;
annotationView.enabled = YES;
annotationView.pinColor = MKPinAnnotationColorGreen;
annotationView.canShowCallout = YES;
annotationView.rightCalloutAccessoryView = calloutButton;
annotationView.animatesDrop = YES;
return annotationView;
}
return nil;
}