PDA

View Full Version : UITabBar setSelectionIndicatorImage doesn't work after tab reordering




Tex-Twil
Aug 3, 2012, 03:23 PM
Hi,
I use the Appearance to customise my tabbar and I set the "setSelectionIndicatorImage". This works fine. The problem is that when I reorder the tabs positions using the "More" edit button, the background of a selected tab is not showing up anymore. Instead, the default selection background is shown.

Here is how I customise it:


UITabBar *tabBarAppearance = [UITabBar appearance];
[tabBarAppearance setSelectionIndicatorImage:[theme tabBarSelectionIndicator]];



Here is the result (white background of the selected tab)

http://f.cl.ly/items/2a1r120f0G3Q3P3p2X3s/Screen%20Shot%202012-08-03%20at%207.51.59%20PM.png

Now I reordered the tabs and a new tab is here but the background is not white

http://f.cl.ly/items/3e2z2f240K1S0x3i0A3k/Screen%20Shot%202012-08-03%20at%207.53.47%20PM.png

If I restart the app, the background show up correctly

http://f.cl.ly/items/2V0k2y342o0m0M250o2B/Screen%20Shot%202012-08-03%20at%207.55.06%20PM.png

What do I have to do so that the new tab items have also the custom background?

cheers



dejo
Aug 3, 2012, 07:27 PM
What do I have to do so that the new tab items have also the custom background?

Sounds like a bug. You should submit it to Apple so they can fix it.

Tex-Twil
Aug 4, 2012, 02:52 AM
yep it's a bug (fixed in iOS6)