I’m kinda desperate right now :/
I have a Tab Bar Controller with 4 Items. In the 4. Tab I included a webView which shows a list of pdf’s. If I open a PDF in the webView there is no way to go back to the main webView with the links. Is there a way by re-clicking the 4. TabBar to reload the View? If I change from the 3. to the 4. tabbar it works (viewWillAppear).

Someone told me, that the following method should work:
- (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();
}
}
but actually I have no idea in which file I should insert that method. (See print Screen)
Thanks a LOT in advance for your help guys!
UITabBarController1.1. Cmd+N and create a new instance of NSObject class, and name it TabBarController
1.2. in
TabBarController.hreplaceNSObjectso that it reads@interface TabBarController : UITabBarController <UITabBarControllerDelegate>1.3. in
TabBarController.madd this:1.4. and this
1.5. In IB, Inspection, change the class of Tab Bar Controller to your
TabBarController(instead ofUITabBarController)1.6. You also need to include
MehrViewController.hinTabBarController.mEdit
in MehrViewController.m (as you posted in your question, assuming it has a webView)