私は今ちょっと必死です:/4つのアイテムを持つタブバーコントローラーを持っています。4.タブには、PDFのリストを表示するwebViewを含めました。webViewでPDFを開くと、リンクを使用してメインのwebViewに戻る方法がありません。4. TabBarを再度クリックしてビューをリロードする方法はありますか?3.タブバーから4.タブバーに変更すると、機能します(viewWillAppear)。
誰かが私に、次の方法がうまくいくはずだと言った:
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController{
if ([viewController isKindOfClass:[UIColor class]]) {
//Try this if you're pushing the webView in another ViewController
[viewController.navigationController popToRootViewControllerAnimated:YES];
//or access to your webView and call goBack();
}
}
しかし実際には、そのメソッドをどのファイルに挿入する必要があるのかわかりません。(印刷画面を参照)
助けてくれてありがとう!