Resolved TabBar item selection

Discussion in 'iOS Programming' started by Nnavick, Jun 10, 2012.

  1. Nnavick, Jun 10, 2012
    Last edited: Jun 11, 2012

    Nnavick macrumors regular

    Joined:
    Oct 13, 2010
    #1
    Hi,


    using this property I changed the UITabBar selection image


    PHP:
     bar.selectionIndicatorImage=[UIImage imageNamed:@"tabbar-active@2x.png"];
    But the image is bigger then the bar item
    How do I resize the image while the property gets UIImage?

    and one more question.
    I added programmatically two UIButtons to the UITabBar.
    the second one is behind by the selectionIndicatorImage but the first In front of the new selection.
    I created them both after the code above so the layers are ok.
    What is the problem?


    Thanks!!!
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    You assign a retina sized image to it, you need to assign a normal image because you're app wil automatically load in the @2x image when it finds a retina display.
     
  3. Nnavick thread starter macrumors regular

    Joined:
    Oct 13, 2010
    #3
    I changed it and nothing happens...
     
  4. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    The size is too big.. It has a fixed size >.>
    If you googled it, you would've seen that the images are around 26x26 to 30x30..
    So try that
     
  5. Nnavick thread starter macrumors regular

    Joined:
    Oct 13, 2010
    #5
    It's working!! yay!!
    Thanks!

    What about my second question,do you know what is the problem?
     
  6. Nnavick thread starter macrumors regular

    Joined:
    Oct 13, 2010
    #6

    Second problem was solved :) !
     

Share This Page