How do you set the title to a UITabBarItem?

When using the initWithTabBarSystemItem to create a UITabBar object, is there a way to set the title? I tried setting the title property (in the viewController element and tab), but it doesn't seem to matter. I know about the initWithTitle: image: method, but I want to use one of the system icons with a custom name.

+6
source share
2 answers

If yo uses systemItem, you cannot configure it, you will have to create a custom element and use the same or similar works ... you can get the cover from: http://www.teehanlax.com/blog/iphone-gui-psd /

+5
source

You can do this in two ways.

  UITabBarItem *tabBarItem = [[UITabBarItem alloc ] init ]; tabBarItem.title = @"Custom title"; 

or

Go to the interface builder; Click on UITabBarItem and edit it.

-3
source

Source: https://habr.com/ru/post/889736/


All Articles