2

When you create more than 5 tabs in a tabbar application it automatically creates a "more" tab with a custom icon of 3 dots. Is there a way to change that icon for example to an arrow or any other icon I wish to? I've tried several things including..

UITabBarItem *more = [tabBar.items objectAtIndex:4]; or
UITabBarItem *more = (UITabBarItem *)tabBarController.moreNavigationController;  or
UITabBarItem *more = (UITabBarItem *)[tabBar.items objectAtIndex:4];  or

[tabBarItem3 setFinishedSelectedImage:[UIImage imageNamed:@"arrowSelexted.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"arrow.png"]];

and nothing works.. I also tried allocating the tabBarItem but still nothing..

UITabBarItem *more = [[UITabBarItem alloc] initWithTitle:@"not" image:nil tag:0];
tabBarController.moreNavigationController.tabBarItem = more;

any ideas?

user1780591
  • 207
  • 4
  • 14
  • 3
    Possible duplicate .. http://stackoverflow.com/questions/12150788/customize-the-more-uibarbuttonitem-in-uitabbar – Amar Jun 14 '13 at 07:12
  • You need to allocate new tabbar item for the moreNavigationController and then use your customisation. – Amar Jun 14 '13 at 07:19
  • @Amar I tried UITabBarItem *more = [[UITabBarItem alloc] initWithTitle:@"not" image:nil tag:0]; tabBarController.moreNavigationController.tabBarItem = more; and it still does not work. – user1780591 Jun 14 '13 at 07:38

1 Answers1

6

You can use moreNavigationController of tabBarController:

tabBarController.moreNavigationController.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"More" image:[UIImage imageNamed:@"arrow.png"] tag:0];
manujmv
  • 6,450
  • 1
  • 22
  • 35