简体   繁体   中英

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM