4

Possible Duplicate:
Custom colors in UITabBar

The iPhone UITabBar generally uses a blue and gray icon scheme. However, the iPod Touch ships with an application from Nike that has a red icon overlay, as opposed to the blue overlay. Here's a screen shot:

Image Link http://1.bp.blogspot.com/_iTGXYFIkfkA/SMiXRtd8HsI/AAAAAAAAKJQ/5iwA9wcZZjw/s400/ipodtouch2_2.jpg

How do I do that? Do I use the hidden setSelectedImage method in UITabBarItem? If so, when do I call this?

Community
  • 1
  • 1
Michael T
  • 1,367
  • 2
  • 16
  • 27
  • Note that your application might get rejected for this. – Can Berk Güder Apr 15 '09 at 23:20
  • 1
    Actually this is not a duplicate question. The UITabBar and UITabBarItem are separate objects. Also, subclassing the UITabBarItem doesn't give you even close to the same access as subclassing the UITabBar does. – Matt Dawdy May 14 '09 at 21:23
  • SWIFT 3 update: http://stackoverflow.com/a/38164547/1736679 – Efren May 10 '17 at 07:41

1 Answers1

1

There is no supported way to do that without custom drawing. Tab bar items don't even use the colors in your images, only the alpha channel. See also: Changing Tint / Background color of UITabBar.

Community
  • 1
  • 1
Chris Lundie
  • 6,023
  • 2
  • 27
  • 28