モーダル ビュー コントローラーを表示しようとすると、例外が発生します。
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'Attempting to begin a modal transition from <UINavigationController: 0x1d906060>
to <UINavigationController: 0x1da7a6d0> while a transition is already in progress. Wait
for viewDidAppear/viewDidDisappear to know the current transition has completed'
今、私は同様の質問を読みました.
[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(openModalController) userInfo:nil repeats:NO];
プレゼンテーションは次のようになります。
- (void)openImage:(ImageModel *)imageModel{
FullscreenImageViewController_iPhone * controller = [[FullscreenImageViewController_iPhone alloc] init];
controller.imageModel = imageModel;
UINavigationController * navController = [[UINavigationController alloc] initWithRootViewController:controller];
UIViewController * visibleController = [[AppDelegate_iPhone app] visibleViewController];
[visibleController presentViewController:navController animated:YES completion:^{
}];
}
これは本当の解決策ではありませんよね?アプリのどこかでトランジションが行われているかどうかを確認し、現在のトランジションが終了した直後に新しいモーダル ビューを開くにはどうすればよいですか?