3

I'm trying to create a custom tab bar item with a custom title but I do want to use a standard system icon.

Here's my code:

UITabBarItem *aboutUsItem = [[UITabBarItem alloc] initWithTabBarSystemItem: UITabBarSystemItemContacts tag: 0];
    overOnsItem.title = @"About us";

    self.tabBarItem = AboutUsItem;

but this does't work..

Thanks in advance!

Charles
  • 50,943
  • 13
  • 104
  • 142
Robin.v
  • 719
  • 3
  • 8
  • 16
  • **What** doesn't work? Are there error messages? –  Jun 12 '12 at 19:09
  • Well, it just does't do a thing, no error messages or something. Just now showing... – Robin.v Jun 16 '12 at 12:47
  • From the documentation: "This method returns a system-supplied tab bar item. The title and image properties of the returned item cannot be changed later." You would have to get the icon and then create a `UITabBarItem` with this icon and your own title, but Apple tends to frown upon that. – Michael Mior Jun 21 '12 at 00:25

0 Answers0