を作成して MKAnnotationViewUIButtonのプロパティに割り当てる必要があります。rightCalloutAccessoryView
mapView:viewForAnnotation:カスタム インスタンスを返すメソッドで、このMKAnnotationViewコードを挿入してボタンを作成し、それをアクションに関連付けます。
MKAnnotationViewインスタンスが呼び出され、呼び出さannotationViewれるメソッドはpresentMoreInfo.
UIButton * disclosureButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[disclosureButton addTarget:self
action:@selector(presentMoreInfo)
forControlEvents:UIControlEventTouchUpInside];
annotationView.rightCalloutAccessoryView = disclosureButton;
あなたのpresentMoreInfo方法は次のようになります
- (void)presentMoreInfo {
DetailsViewController * detailsVC = [DetailsViewController new];
//configure your view controller
//...
[self.navigationController pushViewController:detailsVC animated:YES];
}