Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode iOS Universal application Image sizes

I am trying to create universal application for all iOS devices (iPhone and iPad). Now i am confused by Image size processing. give me a @1x , 2x, 3x Image size process and details.

like image 517
Apple_Ajay Avatar asked Sep 21 '15 12:09

Apple_Ajay


People also ask

What size should images be for app?

If you want the In-App to appear like a modal, you need to upload a square image, with a width of 1200px. If you want the In-App to appear like a fullscreen, you need to upload an image with a 2:1 ratio (for example 1200x600 pixels).

What is 1x 2x and 3x in iOS?

1x, 2x, and 3x images allow developers and Apple to optimize app presentation based on the user's device, whether an entry-level iPhone or the most expensive iPad. Conceptually, 1x, 2x, and 3x images are the same image -- simply at different sizes.

How do I see the size of an iOS app in Xcode?

Product > Archive (you need the iOS device scheme selected here, which means you need a valid signing identity set up) Window > Organizer. Select the "Archives" tab. Select your archive, and in the header detail view, click "Estimate Size"

How many pixels are iOS icons?

As for iOS, app icons should be sized at 1024×1024 pixels. Similar to Android, the icon will be resized depending on the device and context, but Apple takes care of that for you. If you want the specifics on those sizes for visual testing or experimenting, click here.


2 Answers

As you know, there are multiple iOS devices available in the marketplace, such as iPhone 4, iPhone 4s, iPhone 5, iPhone 5s, iPhone 6, iPhone 6+, iPad, iPad Retina and so forth.

These devices have different resolutions where the newer devices (such as iPhone 6 and iPad Retina) have higher resolutions and older devices (such as iPhone 4) have lower resolutions.

For an image, the @1x, @2x and @3x placeholders in an image asset allows you to provide:

  1. a low resolution image which maps to @1x,
  2. a mid resolution image which maps to @2x, and
  3. a high resolution image which maps to @3x.

Therefore, in a universal app, the @1x / low resolution image for your icon, for example, will be used automatically for the iPhone 4 devices while your @3x / high resolution image will be used for the iPhone 6 devices.

For my universal apps, I take my various PNG images and scale them according to Icon and Image Sizes in Apple's iOS Human Interface Guidelines documentation.

For example, if I have an App Icon image then I will create three different copies of that image in three different size:

  1. The low resolution @1x version at 76 x 76.
  2. The mid resolution @2x version at 120 x 120.
  3. The high resolution @3x version at 180 x 180.

If you are using a storyboard then you can drag and drop the relevant image into the corresponding 1x/2x/3x image assets position for the image.

Again, refer to Apple's Human and User Interface guidelines to get a feel for an approximate image size that you want to target for the various assets (i.e., App icon, Launch image, Settings icon, Tab bar icon, etc).

like image 77
whyceewhite Avatar answered Sep 26 '22 23:09

whyceewhite


There is an image naming convention for the devices. Please check below apple doc for more refrences- http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/LoadingResources/ImageSoundResources/ImageSoundResources.html#//apple_ref/doc/uid/10000051i-CH7-SW17

use '~iphone' for iPhone images and no suffix for iPad. You may use '~iPad' for iPad images.

MyImage.png - Default version of an image resource.

[email protected] - High-resolution version of an image resource for devices with Retina displays.

MyImage~iphone.png - Version of an image for iPhone and iPod touch.

MyImage@2x~iphone.png - High-resolution version of an image for iPhone and iPod touch devices with Retina displays.

like image 39
nilam_mande Avatar answered Sep 25 '22 23:09

nilam_mande