Discussion Forums  >  Images, Documents, File Locations

Replies: 5    Views: 129

MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
12/06/13 08:19 AM (10 years ago)

@2x files

Hey, how exactly do the @2x image files work. Lets say I want the app to use a 1024x768 image for old devices and a 2048x1536 for new devices. Do I include 2 images in the project, one for each size, same name, but on also has a @2x in the end of the name (image1.png and <a href="mailto:[email protected]">[email protected]</a>) . I set up the control panel to use image1.png for ipad, and if the app is a retina display, it will automatically load the <a href="mailto:[email protected]">[email protected]</a> file? Is this it? Thanks.
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
12/06/13 11:22 AM (10 years ago)
Yes correct! As long as you give the file, the Xcode will do the rest. If you are using a retina device, it will automatically find the file and show it. As you said correctly, the size is double in btoh dimensions: image.png = 100 x 100 [email protected] = 200 x 200 splash.png (non-retina) = 320 x 480 splash@2x (retina) = 640 x 960 If you want to be really confusing, there is also an option for the iPhone 5: [email protected]
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
12/06/13 11:25 AM (10 years ago)
Thanks Thomas. If its for a background, why not have a gib image, 2048x1536 and then set the definition on the control panel to full screen keep ratio.
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
12/06/13 12:42 PM (10 years ago)
For background, you may as well have one, but for icons, you must have @2x.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
12/10/13 08:57 AM (10 years ago)
What you mean for icons, for icons you might use on a menu?
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
12/10/13 10:17 AM (10 years ago)
Yep, you're right! Menu icons. Sorry for not clarifying.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.