I want to catch the event when someone switches between tabs. I have the following two function in my appdelegate file:
- (BOOL)application:(UIApplication *
I also struggled with this a lot but my UITabBarNavigationController is pretty far from AppDelegate to set it there, and the only way to actually make it work was to do it not in the viewDidLoad of the UITabBarController subclass itself, but in its:
-(void)viewDidLayoutSubviews {
[ super viewDidLayoutSubviews ];
self.delegate = self;
}
And that solved it. Alternatively you can do it in any of the tab bar controlled viewcontrollers, but that just feels wrong.