FWIW, the other way of doing this is using an observer on selectedViewController.
// Add Observer
// Note: tabBarController.selectedIndex is not observed as it does not call observeValueForKeyPath on manual switch
[self.tabBarController addObserver:self forKeyPath:@"selectedViewController" options:NSKeyValueObservingOptionNew context:@"changedTabbarIndex"];
// Method for Handling Observations
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
NSString *action = (__bridge NSString*)context;
if([action isEqualToString:@"changedTabbarIndex"])
{
// Stuff to do on selected Tab changed
}
}
// Change selectedViewController
[self.tabBarController setSelectedViewController:[[self.tabBarController viewControllers] objectAtIndex:kSomeTab]];
More Info:
I didn't get any notifications when I touched on tabbar items