Hello!
I have a TabBar in my application and I do this in my AppDelegate:
...
test2ViewController = [[Test1ViewController alloc] init];
...
navigationTest2Controller = [[UINavigationController alloc] initWithRootViewController:test2ViewController];
NSArray *myControllers = [NSArray arrayWithObjects:..., navigationTest2Controller, nil];
[self.myTabBarController setViewControllers:myControllers animated:NO];
Now I have the problem that I am in a ViewController and I want to switch to the "navigationTest2Controller". I do this in my AppDelegate with:
self.myTabBarController.selectedViewController = navigationTest2Controller;
This works. It switches to this ViewController! This ViewController was already loaded and the viewDidLoad method was called. In this viewDidLoad method is a methos call:
[self myMethod];
I want, that if the view switches to this ViewController this "myMethod" should always be called. How can I do this? In my AppDelegate before the line
self.myTabBarController.selectedViewController = navigationTest2Controller;
??? Or is there another delegate which will be called every time the ViewController is selected/switched to?
Does anyone know this?
Thanks a lot in advance & Best Regards.