0

I want to replace the normal highlight with an image on tabbar.

What is the simplest way to do this on iOS4 and iOS5??

highlight

tab bar

RRN
  • 1,127
  • 1
  • 12
  • 37

1 Answers1

1

This is super easy in iOS 5 (see the "Customizing Appearance" section of Apple's UITabBar documentation).

If your client is insisting on iOS 4, you'll have to be a bit more creative. Consider subclassing UITabBar or UITabBarController and doing some drawing of your own. Here is an example (and another example and another example which has an answer which points to something called BCTabBarController) you can look at. All great potential solutions for you.

Community
  • 1
  • 1
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • Subclassing tabbar is allowed on app store? – RRN May 31 '12 at 15:07
  • Yes, it's allowed on the app store. As long as you are not using any "private" Apple API's. – Michael Dautermann May 31 '12 at 15:50
  • [Private framework API's](http://cocoadev.com/wiki/PrivateFrameworks) are (generally) API's that Apple uses within their own applications to do things, but they're not supported for use by non-Apple apps and Apple therefore rejects apps that attempt to make use of them. If you don't know how to use them, don't worry, you should be safe. – Michael Dautermann May 31 '12 at 16:45