1

As seen below, my image is being cropped, yet there appears to be enough space to render it. As well, the image seems to be at the top.

I have no title set so want no text there. How can I get the button to center and fit the image?

enter image description here

Ian Vink
  • 66,960
  • 104
  • 341
  • 555

2 Answers2

1

You can't. Either reconsider putting text there (images are almost never entirely self explaining, the are mostly usefull as visual mnemonic). Or you have to implement the tab bar yourself.

Kris Van Bael
  • 2,842
  • 1
  • 18
  • 19
0

This is fixed in iOS 7.1. e.g.

((UIViewController *)self.viewControllers[0]).tabBarItem =
    [[UITabBarItem alloc] initWithTitle:@""
                                  image:[UIImage imageNamed:@"tab_1"]
                                    tag:0];