I have a TabBarController that contains 5 TabBarItems, i want to have a control over those items so i create a new class that extends UITabBarController
and make it the delegate for the TabBarController <UITabBarControllerDelegate>
then i bind the TabBarController on the story board with this class, but I'm unable to create any outlet for any UITabBarItem also i tried to print the titles of each TabBarItem in the viewWillAppear method as follows:
-(void)viewWillAppear:(BOOL)animated{
for (int i=0; i<5; i++) {
UITabBarItem *tabItem=[self.tabBarController.tabBar.items objectAtIndex:i];
NSLog(@"Title:-------->%@",[tabItem title]);
}
}
but it prints Null foreach item title, what can i do to have a control over those TabBarItems ?