Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

custom UITabBar selected tab image, iOS 5 and up

I'm creating a custom UITabBarController where I customise the tabBar this way:

self.tabBar.backgroundImage = [UIImage imageNamed:@"imgTabBarBeta.png"];

I then change the selector indicator this way:

self.tabBar.selectionIndicatorImage = [UIImage imageNamed:@"imgTabBarSegmentSelected.png"];

But apparently it becomes a selected image for all 4 of my tabs, where I would like to have each tab its own selectionIndicatorImage.

Any ideas on how to implement this kind of thing? Thanks in advance!

like image 609
Sergey Grischyov Avatar asked Jan 19 '26 11:01

Sergey Grischyov


1 Answers

You can check out this:

Setting a background image for a tabbar

http://www.raywenderlich.com/4344/user-interface-customization-in-ios-5

Or try this Github project

https://github.com/briancollins/BCTabBarController

like image 128
Shekhar Gupta Avatar answered Jan 21 '26 03:01

Shekhar Gupta



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!