Iphone 通过单击TabBarItem重新加载视图(导致PDF)
我有一个带有4项的选项卡栏控制器。在第4页中,我包含了一个带有一些链接的webView。其中一个链接是PDF,如果我在webView中打开PDF,则无法返回带有链接的主webView。 有没有办法重新点击4。选项卡栏重新加载视图?如果我从3号换。到4号。选项卡栏它工作(视图将出现)![在此处输入图像描述][1]Iphone 通过单击TabBarItem重新加载视图(导致PDF),iphone,objective-c,pdf,uiwebview,uitabbaritem,Iphone,Objective C,Pdf,Uiwebview,Uitabbaritem,我有一个带有4项的选项卡栏控制器。在第4页中,我包含了一个带有一些链接的webView。其中一个链接是PDF,如果我在webView中打开PDF,则无法返回带有链接的主webView。 有没有办法重新点击4。选项卡栏重新加载视图?如果我从3号换。到4号。选项卡栏它工作(视图将出现)![在此处输入图像描述][1] 提前感谢您的帮助。UITabBarDelegate中有一个方法称为: - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarI
提前感谢您的帮助。UITabBarDelegate中有一个方法称为:
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item;
您还可以使用它来捕捉所选选项卡栏项目的触摸。尝试使用()的方法:
(可能是这样的)
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController{
//Try this if you're pushing the webView in another ViewController
[viewController.navigationController popToRootViewControllerAnimated:YES];
//or access to your webView and call goBack();
}