私のアプリにはメイン画面があります(mainView)。に、ボタンmainViewがあります。ユーザーがタップすると、使用します
[self presentViewController:libraryView animated:YES completion:nil]
別のビューを表示します ( libraryView)。次に、libraryView私は使用します
[self.view addSubview:tabBarController.view]
UITabBarController2 つの View Controller を持つa を追加するには:featuredBooksおよびrecentBooks
すべて正常に動作します。しかし、ボタンを追加してfeatureBooksを閉じてlibraryViewに戻るとmainView、次の方法は機能しません
[self dismissViewControllerAnimated: YES completion:nil]
[self.parentViewController dismissViewControllerAnimated: YES completion:nil]
[self.presentingViewController dismissViewControllerAnimated: YES completion:nil]
私はその理由を知っています:ではなく のビューselfを参照しています。featureBookslibraryView
では、 Tab Bar Controller 内の View Controller (または) から を参照してlibraryView閉じ、戻るにはどうすればよいでしょうか?mainViewfeatureBooksrecentBooks
どうもありがとうございました。