0

I want to implement something like this:

Tab bar sample

What I want is the selected tab bar Item to show no title and make the icon larger.

Thing is, trying to change the item image frame is not working.

Any pointers?

Thank you in advance

rmaddy
  • 314,917
  • 42
  • 532
  • 579
WizMeister
  • 609
  • 7
  • 16
  • 1
    Possible duplicate of [Moving UITabBarItem Image down?](http://stackoverflow.com/questions/16285205/moving-uitabbaritem-image-down) – Marcus Adams Feb 04 '16 at 19:39

1 Answers1

0

You could set the UITabBarItem's title to nil and set the imageInsets, something like this:

myTabBarItem.title = nil;
myTabBarItem.imageInsets = UIEdgeInsetsMake(0, 0, -10, 0);

Setting the title to nil keeps the title from displaying, then the image inset adjustment takes the space back that was reserved for the title.

Also see: Moving UITabBarItem Image down?

Community
  • 1
  • 1
Marcus Adams
  • 53,009
  • 9
  • 91
  • 143