I have a class tabBarController and every time its selectedIndex property changes, I want to trigger a custom method. How do I accomplish this?
this is how the tabBarController is being declared in the h’s instance vars:
BaseViewController *tabBarController;
Use UITabBar’s
-(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem * )itemmethod to determine the index of the tab and consequently the method you wish to call.