0
我正在嘗試爲我的註釋區域添加一個通用標註附件,但由於某種原因它沒有顯示出來。 下面的代碼:標註附件沒有出現
- (void) setupMap:(PFObject*) venue {
...
OTNVenueAnnotation *annotation = [[OTNVenueAnnotation alloc] init];
annotation.coordinate = CLLocationCoordinate2DMake(location.latitude, location.longitude);
annotation.title = [[venue objectForKey:@"name"] uppercaseString];
annotation.venue = venue;
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
MKPinAnnotationView *customPinView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"identifier"];
customPinView.leftCalloutAccessoryView = rightButton;
[self.mapView addAnnotation: annotation];
}