Launch Screen Image size for all iOS screen sizes - ios

I am trying to create a lunch screen image for my iOS app. But I am not sure whats the right size for it.
According to apple website for iPhone 6 the size should be 750 x 1334 (#2x) for portrait.
But my question is, how to create a launch screen image that will fit for all screen sizes such as iPhone 5, 5s, 6, 6 plus, iPads etc?
Whats the correct way of doing this?

Go to images.xcassets
there you can see launch image sizes.Just Enable iOS version from right side.
iPhone Portrait iOS 8:- 1242*2208 (5.5 inch)
750*1334 (4.7 HD)
iPhone Landscape iOS 8:-2208*1242 (5.5inch)
iphone Portrait iOS 7,8 :- 640*960 (#2x)
640*1136 (Retina)
iPhone Portrait 5,6 :- 320*480 (#x)
640*960 (#2x)
640*1136 (retina4)

But my question is, how to create a launch screen image that will fit
for all screen sizes such as iPhone 5, 5s, 6, 6 plus, iPads etc?
That will be very hard to do. The devices have different aspect ratios and the difference in size between say iPhone 5 and iPad Air is pretty big to use one image for all. If you want to use the classical launch screen with a screenshot, resizing one image won't look the same as the user interface on different devices. If you want a launch bitmap image you will need to supply all the necessary sizes.
Whats the correct way of doing this?
You can create either launch PNG image or launch screen as a storyboard.
For launch image, your project has an assets catalog. Either use existing or add new iOS launch image. The editor will show you all required sizes.
For a storyboard, your application probably already has LaunchScreen.storyboard. You typically won't create specific size or sizes here, but use auto layout that will resize the screen appropriately.

Related

Launch screen storyboard for multiple devices and different orientations in iOS

My application supports all devices from 4 inch onwards in both orientations.
iPhone - 5, 5S, 5C, 6, 6S, 6+, 6S+, SE
iPad 4, iPad Air, iPad Air2, iPad Pro etc
Using asset catalog for launch screen its working fine but in iPad Pro app displays standard keyboard rather iPad Pro optimized keyboard which is bigger and doesn't give best user feel.
As per below link app should be using launch storyboard rather than asset images to get optimized iPad Pro native keyboard.
https://forums.developer.apple.com/thread/26357
Now question is how to support both orientations during launch screen storyboard ?
How to add different launch images for portrait and landscape modes in storyboard ? Using size class for iPad in both orientations its both Regular and Regular size.
Note - Because it launches a screen storyboard, one can't customize the size class with custom class.
In your launchsScreen.storyboard add imageView and set it's four constraints like : top,bottom,leading,trailing.
Now, in your assets add separate images for iPhone and iPad with 1x,2x,3x resolution for iPhone and 1x,2x for iPad.
And set that image to that imageview. It will manage then for every device!
You can set different images for different size class in assets. So for different orientation you can set different images in assets.
refer Apple documentation for more details.
And yes you can use vector graphics as suggested in comment by #pkc456 to keep your app light weight.

How to let Xcode know which asset to use for the target iPhone?

I am designing an app for iOS in SWIFT. I have decided that the auto layout will be compact and will be only for iPhone in portrait mode. I wanted to clear up a few hiccups on designing buttons for the 2 different screen ratios: the first being the iPhone 4s and the second ratio being the iPhone 5 and above. Because the new iPhones have a taller height, does that mean I will need to design 2 different ratios of buttons, and if so, how do I use them in Xcode? For example here's the stock apple calculator;
link to picture: http://imgur.com/mkIBghD
As you can see the the buttons on the taller iPhone have a square shape. The buttons on the 4s are more stubby. What do I need to do in Xcode to let the app know which asset to use for the respective phone and how would I implement that in Auto Layout?
thanks
In order to do this you setup autolayout constraints. This will make the buttons change shape/size depending on the device. You do not need to have multiple assets because all the phones you are talking about have the same retina (2x) display.
You need to add three different sized images for a single Image Set in Images.xcassets . The sizes should be 1x for iPhone 4s, 2x for iPhone 6(It'll work for iPhone 5 too) and 3x for iPhone 6 plus.

How to scale images to different iPhone screen using storyboards?

I am developing an app in which i am displaying certain images such as delete icon,search icon.I have images by names are
delete.png
delete#2x.png
delete#3x.png
I have created images.xcassets & added the images in that for 1x,2x & 3x. Now i have added an UIImageView on story board & it's default image is delete.png(32*32) it runs fine on 3.5 inch screen but images does not scale on 4.7 & 5.5 inch screen iPhone. Can some one please help me out.What to & how to do it?
I thick #Banning and #Fatti Khan suggestion will be the solution of the problem.
Instead of using image name as delete.png use just delete
as a ratio set the images with the exact size as example if the 1x image is 30 px then 2x must be 60px and 3x 90px
1x images are for the original iPhone through the 3GS - 'standard' resolution devices (3.5" screens)
2x images are for the iPhone 4, 4S (3.5" Retina screens) and also iPhone 6.
Retina 4 2x are for the iPhone 5 and 5s (4" Retina screens)
3x images are for the new iPhone 6+ (5.5" super-Retina [3x] screen)
EDIT:
please clean your project and then check again (cmd+shift+k) of delete your derived data.
also check your view is autolayout enable or disable.
or
add The launch image Default-568h#2x.png as i thought your Code unable to detect the different type of screens it have,so follow this steps
First I would like to suggest that,
Preapre all Images,
Select Project from Project Navigator And Go to Summary and scroll down this
screen appears, then right click on that and choose file from your
computer it will automatically copied to project and it will entered
in plist file also..
if your application is universal then you have
to set for iPhone and iPad Both.

how to get a normal keypad on iphone 6 and 6 plus

I'm building an app that works fine on iphone 5. When I look at it on a iphone 6 or 6 plus however, I see that the keypad is stretched, basically zoomed in. I'm using autolayout and storyboards.
What do I need to set in order to make the keyboard scale to a normal size?
You need to ensure that the app is optimized to run in the native resolution of these devices, rather than the zoomed compatibility mode. This can be done by setting a properly-sized launch image for the iPhone 6/6+.
These launch images will be labeled Retina HD 4.7 and Retina HD 5.5 in your launch images file, respectively. If you do not see these options available in your launch image assets, create a new launch image set and they should be there.

iphone app size smaller than screen

I'm developing an app and have come against a strange issue I can't find the answer for - when testing the app on an iPhone 5 the whole app display window is shrunk down to what looks like a 3.5 size display (the top and bottom of the screen are black and even the status bar is pushed down). When I test the app on an iPhone 5s running iOS 8 it displays full screen as expected.
Also when testing in the iOS simulator for iphone 5, and 5s it displays as expected. I'm using xcode 6 for development.
Any help would be greatly appreciated.
You need to set splash screen for your app. Otherwise it will take 3.5 screen size.
Just set the splash screen and you will be done.
So from iOS8, you can use a .xib as your Launch image, but if you have to support past versions of iOS, you have to provide static SplashScreens.
here is a link about replacing the launch image with a .xib file
If you have to use static Launch images, you have to add every supported resolutions:
320 x 480 - not retina iPhones
640 x 960 - retina 3.5" iPhones
640 x 1136 - retina 4" iPhones
750 x 1334 - iPhone 6
1242 x 2208 - iPhone 6 Plus
use size class approach on any height and any width. Hope you will get your solution from the following link
http://captechconsulting.com/blog/tyler-tillage/ios-8-tutorial-series-auto-sizing-table-cells
just clarify on the other answers, make sure you also set the 'Launch Image Source' under 'General' -> 'App Icon and Launch Images'
screen shots....
...mine used to be....
...and i changed it to... (and set an image)
GLHF!

Resources