Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

High-resolution icons for tabs - Retina display

I'm trying to add high-resolution artwork to my application so it displays clearly on my iPhone 4, however even though I've added the corresponding high-resolution version of the image, forums@2x.png, it's not picking it up and using it on either the iPhone 4 itself or the simulator.

My code is as follows:

var forumsTab = Titanium.UI.createTab({  
    icon:'img/icons/tabs/forums.png',
    title:'Forums',
    window:forumsMainWindow
});

I'm using SDK version 1.4.0, and I can't figure out why it won't use the high-resolution icons.

— asked September 12th 2010 by Liam McLoughlin
  • 4
  • display
  • icon
  • iphone
  • retina
  • tab
0 Comments

1 Answer

  • If I understood correctly, shouldn't:

        icon:'img/icons/tabs/forums.png',
    

    Be:

        icon:'img/icons/tabs/forums@2x.png',
    
    — answered September 12th 2010 by Colton Arabsky
    permalink
    2 Comments
    • Doing that just makes no icon appear at all on the tab. I believe if you just put forums.png it should automatically use the @2x version on high-res devices, but it isn't doing.

      — commented September 12th 2010 by Liam McLoughlin
    • The @2x only works with the splash screen and icon, not whats programmability created. You would have to do a platform detection for that to work.

      — commented November 9th 2010 by Josh Lewis
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.