モーダル ビューで作成されたビューでボタンを押すと、モーダル ビューが閉じられ、別のモーダル ビューが読み込まれます。
- (void)loadLanguageSelectionView {
[self dismissViewControllerAnimated:YES completion:nil];
UIViewController *languageSelectionController = [[LanguageSelectionViewController alloc] initWithNibName:nil bundle:nil];
[languageSelectionController setModalPresentationStyle:UIModalPresentationCustom];
[languageSelectionController setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
[self presentViewController:languageSelectionController animated:YES completion:nil];
}
このコード ブロックを実行すると、次のエラーがスローされます。
DenkoStation[4259:73173] Warning: Attempt to present <LanguageSelectionViewController: 0x7b185430> on <ViewController: 0x79f52e50> whose view is not in the window hierarchy!
私が驚いたのは、ここで概説したようにコードに変更を加える前に、コードが正常に実行されていたことです。
間違いはどこですか?