私のストーリーボード (上に表示) には、注釈付きの MKMapView を保持する ViewController があります。これらの注釈には開示アイコンが保持されており、タップすると、ユーザーは別の ViewController に移動する必要があります。そのために、View Controller 間にプッシュ セグエを作成しました。次に、'showDetail' の識別子を指定し、次のコードを実装しました。
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
[self performSegueWithIdentifier:@"showDetail" sender:self];
}
ただし、次のエラーが発生します。
Could not find a navigation controller for segue 'showDetail'. Push segues can only be used when the source controller is managed by an instance of UINavigationController.'
どこが間違っていますか?ソース UIViewController を UINavigationController に変更しようとしましたが、ビューが黒い画面として表示されます。