UITabBar setSelectionIndicatorImage doesn't work after tab reordering

Discussion in 'iPhone/iPad Programming' started by Tex-Twil, Aug 3, 2012.

  1. macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #1
    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:

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

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

    [​IMG]

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

    [​IMG]

    If I restart the app, the background show up correctly

    [​IMG]

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

    cheers
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Sounds like a bug. You should submit it to Apple so they can fix it.
     
  3. thread starter macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #3
    yep it's a bug (fixed in iOS6)
     

Share This Page