【发布时间】:2013-06-20 21:05:29
【问题描述】:
我正在尝试向某些现有代码添加标注附件。 这是我的注释主要代码:
OTNVenueAnnotation *annotation = [[OTNVenueAnnotation alloc] init];
annotation.coordinate = CLLocationCoordinate2DMake(location.latitude, location.longitude);
annotation.title = [[venue objectForKey:@"name"] uppercaseString];
annotation.venue = venue;
MKPinAnnotationView* customPinView = [[MKPinAnnotationView alloc]
initWithAnnotation:annotation];
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[rightButton addTarget:self
action:@selector(showDetails:)
forControlEvents:UIControlEventTouchUpInside];
customPinView.rightCalloutAccessoryView = rightButton;
[self.mapView addAnnotation: annotation];
构建错误是: 'MKPinAnnotationView' 没有可见的@interface 声明选择器'initWithAnnotation:'
【问题讨论】:
标签: ios mkmapview mkpinannotationview