问题
I am trying to create a tab bar with just the image, no title. How would I go about doing this?
Here is how I set the image:
FeedViewController.tabBarItem.image=[UIImage imageNamed:@"Describe-Home_Icon_NormalArtboard-1"];
回答1:
[FeedViewController.tabBarItem setTitle:@""];
回答2:
This can easily be done within the interface builder (storyboard or xibs).
Please see the attached screenshot. You can place name of your image here and simply leave the 'Default title' space blank, as I have done here.
In this way it also cuts down the need for adding unnecessary code to your project, easier to read and edit.
Hope this helps, cheers Jim.

来源:https://stackoverflow.com/questions/21394689/how-to-hide-text-in-uitabbar