5

It seems that there is no way to actually set an image for the tab bar title.

Furthermore, can I change the title's font or basically use an attributed string as a tab bar title?

NSPekka
  • 30
  • 1
  • 7
David Liu
  • 16,374
  • 12
  • 37
  • 38
  • 1
    Just to confirm, you want a tab bar where each tab has two (stacked) images (or alternatively, an image and attributed string)? – Doc Mar 05 '14 at 04:28
  • @Doc exactly, either two (stacked) images or an image and an attributed string. – David Liu Mar 05 '14 at 16:41
  • [This other question](http://stackoverflow.com/questions/8412010/how-to-change-the-color-of-text-in-uitabbaritem-in-ios-5) explains how to set the text attributes for a uitabbaritem. As far as setting an image instead, I don't think that it's possible - you may need to make a custom control to do that. – Doc Mar 05 '14 at 20:55
  • @Doc thanks, i will look into that, although it is for iOS 5. – David Liu Mar 05 '14 at 21:19
  • 2
    The setTitleTextAttributes:forState: was added in iOS 5. It's usable in all versions since then. – Doc Mar 05 '14 at 21:23
  • @Doc cool, i will try that once i get home. – David Liu Mar 05 '14 at 21:36
  • @David Liu Did you get any solution yet? – Nishu_Priya May 02 '19 at 11:47

0 Answers0