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;
}