When using the method initWithTabBarSystemItem
to create a UITabBar object is there a way to set the title? I've tried setting the title property (on the viewController
and tab bar item) afterwards but it doesn't seem to make a difference. I know about the initWithTitle: image:
method but I want to use one of the system icons with a custom title.
Asked
Active
Viewed 2,197 times
7

Mick MacCallum
- 129,200
- 40
- 280
- 281

Tom
- 73
- 3
2 Answers
7
If yo are using the systemItem you can't customize it, you will have to make a custom Item, and use the same or similar artwork... you could get the artwork from: http://www.teehanlax.com/blog/iphone-gui-psd/

Grady Player
- 14,399
- 2
- 48
- 76
-
That's a shame that we cannot customize system `UITabBarItem` title :( – piotr_ch May 29 '19 at 17:06
-
@PiotrCh I dont know if that is the case anymore, that was almost 8 years ago... I don't really do any iOS dev anymore... So I am hardly up on the subject... – Grady Player May 29 '19 at 21:08
-4
You can do it in two ways.
UITabBarItem *tabBarItem = [[UITabBarItem alloc ] init ];
tabBarItem.title = @"Custom title";
or
Go to the interface builder ; Click on the UITabBarItem and edit it.

Legolas
- 12,145
- 12
- 79
- 132
-
1You didn`t answer the question, you are not using systemItem. – Guilherme Torres Castro Nov 28 '12 at 15:25