Image sizes required to support all iPhone devices - ios

What all splash screen images do we required to create an iOS application? I want to give support all the devices which supports iOS8. Trying to find out working of Images.xcassates and how to add splash images.
I want to support iPhone 4, iPhone 5/5s/5c, iPhone 6/6+, iPad.
What is the naming convention required to set LaunchImage? I just saw 1x, 2x, Retina 4 2x, and 3x in xcassates. But not getting what file names it required.
Like for non retina and and retina we simply twice non retina image for retina and name it like xxx#2x.png for retina and xxx.png for non retina.
Not getting apple document regarding this.
Thank you.

Now in New versions Image name for splash is not required. you can just drag and drop images in "LaunchImage" image asset. Please check below screenshot.
On right side you can see it's required image size in Expected Size : 1242x2208 pixels.
just drag same size image there and you are done.
Maybe this will help you.

There is a default black LaunchImage in xcassets, you jsut have to dragndrop your images into corresponding canvas. XCode will automatically name those images for you.
Note that in xcassets you can choose to see canvas for only iOS 8, iOS 7 or more, iOS 6 or more, etc.

Using image.xcassets, you do not need to follow naming convention. You just drag and drop the image to placeholder inside the image.xcassets. Xcode will handle that for you.
To support multiple device, you can easily match with the naming below the placeholder.
eg.
iPhone Portrait iOS7,8: 2x: iPhone4, Retina 4: iPhone5/5s/5c
For iPhone 6/6+, you can enable iOS8.0 iPhone checkbox on the right panel.
You can also see the expected sizing on the right panel.

Related

iPhone 6 Launch Image/Launch File issue

I added to the project the Launch images for enabling support of iPhone 6/6+ (1242×2208 & 750×1334).
For iPhone 6+ everything works correctly, but for iPhone 6 on the real device (iOS 8.4.1), I still see Launch Image for iPhone 5 and screen size {320x568}. In the simulator of iPhone 6 app works as expected (correct launch image and screen size {375x667}).
The same behaviour if I use Launch File instead of Launch Image Assets.
How can I solve this issue?
The question is duplicated and the answer is here:
https://stackoverflow.com/a/26504069/697530
iOS handles correctly the Launch Images for iPhone 6/6+. It is enough to specify Launch Image in the Assets, and do not use Launch File for iOS8, but "Display Zoom" in the Settings of the phone must be set to the "Standard" mode for iPhone6 (Settings -> Display & Brightness -> View).
Hope it will help to someone else.
Please check below screen with Lunch image setting and you have to select one by one lunch image box and check size of image e.g. Image_2.png and set image based on that size.
Image_1.png
http://i.stack.imgur.com/BdkPn.png
Image_2.png
http://i.stack.imgur.com/gJdg6.png
Make sure your image size is same as the size of selected box.
Hope this is work for you.
Thanks :)

How to support different screen resolutions in iOS

I want to know the icon sizes for iPhone and iPad.
How can i support different screen densities in iOS.
In my app icon are blur in iPad and iPhone5.
App Icon Sizes for iphone and ipad:
iOS 5 and 6 - 57pts at 1x and 2x:(57x57,114x114)
iOS 7 and 8 - 60 pts at 2x and 3x:(120x120,180x180)
iPad - 76pts at 1x and 2x:(76x76,152x152)
You can read apple documentation to get better understanding.
You have to make your images suit the resolution
Check this LINK
You may want to take a look at this:
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1
Basically: for all included images you should provide two files, 1 named ie "picture.png" and the other "picture#2x.png" and iOS which to use for itself.
You may get different icon sizes at following link :
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html
Set Project icon images as #1x,#2x and #3x, it will automatically get images as per iOS device resolution.

How to set the same image for iPhone Retina Display and iPad non Retina

I have developed an universal app and i import my graphics stuff. I came across with the following thought. If the icon that is referred to iPhone retina display and the file that is referred to iPad non retina display has the same size, is there any way not to import the same file with different names (icon#2x.png & icon~ipad.png) twice?
I am not sure if there is such an icon size that would have same size for iPhone retina and iPad non retina device(Pardon me if I am incorrect). If you are talking about any normal image that you want same for iPhone retina and iPad non retina, and you want the app to automatically select the same image for both devices mentioned above then, no. You can manually do that though, which you probably already know.

#3x images incorrectly used on iPhone 6 or 5S or 5 in XIB's with the "Use as Launch Image" option set

With-in a clean brand new iOS project I've:
added 2 images to the project "background#2x.png" and "background#3x.png"
added a XIB named "LaunchScreen.xib"
checked the XIB's "Use as Launch Screen" option
added a UIView sub-view to LaunchScreen.xib and set its image name to "background.png"
with-in the project settings, under the targets 'General' settings I've set the 'Launch Screen file' to "LaunchScreen"
Now when I launch the app on any of the devices list below the #3x image is displayed in the resulting launch screen when surely the #2x image should be used.
Problem devices (that all use the #3x resource):
iPhone 5 (iOS 8.0.0)
iPhone 6 (iOS 8.0.0)
iPhone 6 (iOS 8.0.2)
iPhone 5 Simulator (iOS 8.0.0)
iPhone 6 Simulator (iOS 8.0.0)
NOTE that the #2x image is distinctive from the #3x image so I can easily identify which one is being used.
At first I assumed this was a bug with the simulator and was staggered when it occurred on a real device also.
I assume this is yet another iOS8 bug however I guess there's also the possibility that its expected behaviour as the result of the launch screen being cached as a static image of some kind.
Any ideas or potential solutions?
EDIT:
For the benefit of others, I have subsequently found that if the images are instead added to an Images.xcassets image set then the correct behaviour is in-fact observed. HOWEVER this is not an ideal solution for us since we have a very specific image export process which means we are not using an Images.xcassets in out project (there are thousands of images in the app).
I have now also raised a Radar with Apple #18513968
http://openradar.appspot.com/18513968
I've just tried this myself, and get the same behaviour you have mentioned.
By setting the Launch Images Source to "Use Asset Catalog", and adding the Launch Image you can get each device to show its specific background. Some screenshots can be seen here:
Supporting iPhone 6 and iPhone 6+ with different launch/splash screen image for iPad Portrait and Landscape orientations
Looking into it a bit more, I found a website that mention:
http://oleb.net/blog/2014/08/replacing-launch-images-with-storyboards/
"You can use the new adaptive UI features in Interface Builder to fit your layout to different screen sizes. If your scene requires screen-size-specific images, use asset catalogs to define different images per size class."
Maybe that is the only way to do it.

iOS image size for iPhone and iPad

I am developing universal app for iOS,
I am using Autolayout feature in my app,
I have one doubt:
I want to apply background image in my app,
How many background image i will have to make ??
and what will be the naming conventions of the images ?
so that iPhone automatically takes corresponding images according to device.
Like we gives on launch images, default#2x.png, Default-568h#2x.png, Default-Portrait#2x.png and device automatically understands it's corresponding images.
you need 2 types of images for iphone and ipad.
For ipad you just need to add ~ipad before .png. e.g. image.png for iphone and image~ipad.png for ipad.
Do the same for Retina display images also.
e.g.
iPhone Retina: image#2x.png
iPad Retina: image#2x~ipad.png
What should help in your case is Asset Catalogs, which are by far the best way to manage assets for multiple devices.

Resources