次のコードでモーダルビューコントローラを提示しようとしています
MapViewController *mapView = [[MapViewController alloc] initWithNibName:@"MapViewController" bundle:nil];
mapView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self.navigationController presentModalViewController:mapView animated:YES];
[mapView release];
次のエラーが発生し続けます。
'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <UIView: 0x1ed815a0; frame = (0 20; 320 460); autoresize = W+H; layer = <CALayer: 0x1ed81600>> is associated with <UIViewController: 0x1ed835a0>. Clear this association before associating this view with <MapViewController: 0x1dd947c0>.'
これは私が何ヶ月も触れていない古いプロジェクトですが、何がそのようなエラーを引き起こすのだろうか?