Launch image manager for iOS - ios

Table 5-4 (about half way down) this Apple doc page suggests sizes for the launch images for iOS:
Device Portrait Landscape
iPhone and iPod touch 320 x 480 pixels Not supported
640 x 960 pixels (#2x)
iPhone 5 640 x 1136 pixels (#2x) Not supported
iPad 768 x 1024 pixels 1024 x 768 pixels
1536 x 2048 pixels (#2x) 2048 x 1536 pixels (#2x)
My app has a photo background at launch so at present I have to use GIMP to crop/resize the photo for each of these, which is fiddly.
Is there a tool to do this automatically ?
One other complication is that there are a couple of logos in the image too, ideally they will be in separate layers, so they can stay legible and tidily laid out for each size/orientation.

There is not a tool that I know of do do this. But there is a button in the Xcode Organizer, under Screenshots, labeled “Save as Launch Image”. If you set up your code to dynamically generate the image you want, you can run your app on various devices and grab images of it running, and then use those images as your launch images. You may have to modify them a little bit, but it’s certainly easier than creating each one from scratch.

Related

Background image size on iPhone

Hello I have made a background image (size: 1136 x 650). Then I have implemented it into my app but on iPhone 5 it is too small though in all the guides I read they said that 1136x650 would be the size for a background image on iPhone 5. Then I have used the same image but with size: 2272x1300 (#2x) and now it fits perfectly.
Does that mean that I have to use a background image with the size: 2208x1242(normal) and 6624x3726 (#3x) for an iPhone 6+?
The number of physical pixels in the screen and the number of points in the screen's coordinate system are different numbers. As you have discovered an iPhone 5 has four times as many physical pixels on the screen as logical pixels.
For iPhone 6, in order to fill the whole screen in landscape orientation, you would need a 1334 x 750 image. For the 6+, you would need a 2208 x 1242 image. A quick way to tell is to check the requirements for the launch image, which you can get to from here.

Getting the Unity iOS Splash Screen

My app has splash screens of varying sizes for different iOS devices. They are registered in the Unity PlayerSettings for iOS under 'iPhone 3.5"/Retina', 'iPhone 5.5" Landscape/Retina', etc.
My first scene is a loading scene that should look exactly like the splash screen (more initialization is going on under the hood).
I want to grab the splash screen asset that was used and place it in my loading scene, but I'm not sure how to determine exactly which asset was used.
I suppose I could build a lookup table keyed on strings returned by SystemInfo.DeviceModel, but that seems fragile. I'd much rather use however Unity determines which splash screen to display, but I haven't been able to find how that happens.
1. Check the device resolution
You could check for the device resolution using Screen.width and Screen.height:
iPhone 3.5": 480 x 320 / 960 x 640 (retina)
iPhone 4": 1136 x 640
iPhone 4.7": 1334 x 750
iPhone 5.5": 2208 x 1242
iPad: 1024x768 / 2048 x 1536 (retina)
2. Use the same image for all devices
I don't know how's your splash screen set up. But what I did on a previous project was to use the same image for all devices. Basically I just used the 4:3 (iPad (retina)) version and made a script that scaled it to fit it's width and just cut of the top and bottom area on devices with a wider screen.
Depending on your GUI system you may just anchor the image to the edges of the screen.

iOS background size of images

What size of image I need to have if I want to use it as background to full screen?
1.png 320 - 568 points non retina
1#2x.png 640 - 1126 points retina
Am I right? Or what size are correct?
You could use the size of the splash screen images for your views too, making your app iOS 7 forward compatible.
For iPhone 5 and iPod touch (5th generation):
640 x 1136 pixels
For other iPhone and iPod touch devices:
640 x 960 pixels (retina)
320 x 480 pixels (standard resolution)
It depends on what device you're targeting. If you looking at just the iPhone 5/5s then you're spot on. If you're also taking into account everything below the iPhone 5, then you will also need
320x480 (non retina)
640x960 (retina)
So it just depends on the devices you're supporting. There are loads of resources on the net about these things. Also bear in mind that the background size will be different depending on what components you use, such as navigation bars and tab bars. And also if you're supporting iOS 7 then the status bar is transparent, where as on iOS 6 and below, you don't need to provide the background for that (so the above dimensions are actually correct for iOS 7 but not exactly right for iOS 6)

using 1136 x 640 images in storyboard

EDIT: Dont misunderstand. I get that I can put in myImage.png whose size is 568 x 320 and myImage#2x.png whose size is 1136 X 640 and, at run time, iOS will show the lager image if the device has a retina screen. That is not what this is about. Im talking strictly about placing a 1136 x 640 image in the storyboard.
Some details:
Using xcode 5
iPhone only app (iPhone 4 and above ideally)
Targeting iOS 7 (should keep out any iPhone 3gs ...right?)
Single view app
Using storyboards
My understanding is that I can provide only the higher resolution 1136 x 640 images my app needs for the iPhone 5 then use autolayout to constrain things in such a way that my UI works properly even if the device is an iPhone 4 and has less screen real estate.
My issue is that if I drag a 1136 x 640 image onto the storyboard the image is 2X the size of the view im dropping it into. I get that I can resize the UIImageView and set the mode to aspect fit and the image will display correctly in the view.
However, that would get quite annoying. Is there a way to just set the storyboard to use the retina images directly?
Now I can create images that are half the size (568 x 320) and those will drag and drop into the views perfectly. But I cant imagine why anyone would want to do that. This doesnt make sense to me. I would expect the SDK to let me layout the app in the highest resolution possible.
I tried using images named myImage.png and using myImage#2x.png but neither changed anything.
Don't think of the dimensions in Xcode as pixels, but points. So while you set the image dimensions to be 568 x 320, the #2x images are going to use two pixels per point.
What are you testing on? You might not be seeing a difference because you are only testing on retina devices. If you are only planning on supporting iOS 7 (iPhone 4 and up), you won't be using any non-retina devices.

iPhone Launch image for a landscape based application

The problem is that the launch image I have set up isn't showing up I speculate its because its dimension are for portrait but since its landscape based it isn't showing up and I have set up all my launch images correctly on the asset catalog now the thing is I don't know if I'm supposed to set it up as portrait under Deployment info and later then coding for it to once it has completely launched and loaded to stay in landscape and not rotate to portrait I notice that on my asset catalog I don't have an image with the dimensions 320x480 it never asked me for it you know how it has slots well in my project it never gave me one pertaining such dimensions (320x480) it only had two slots for iPhone portrait which were "#2x" (640x960) and "R4" (640 x1136)
Update
I tried changing the dimension from 640x960 to 960x640 but I got an error as soon as I added to the catalog because those weren't the right dimensions
More Details : apple doc
portrait only available in xcode for launch image but you can customize your image. create image landscape mode the portrait size through attached to xcode. it's works perfectly and display image as landscape
Create launch images in different sizes for different devices. Launch images for all devices must include the status bar region. Create launch images in the following sizes:
For iPhone 5 and iPod touch (5th generation):
640 x 1136 pixels
For other iPhone and iPod touch devices:
640 x 960 pixels
320 x 480 pixels (standard resolution)
If at all you still want to view the splash screen in landscape mode you have to design the image in such a way as we cannot change the behavior of the splash screen.
Instead of designing the image as 640x960, design it as 960x640 and your problem will get solved.
Edit:
This is sample splash image in portrait dimension but designed in landscape view
All the best.
The iPhone only uses ONE launch image -- portrait
only the iPad supports orientations during launch
what many do:
have no launch image
make sure applicationDidFinishLaunching returns as soon as possible(!)
show your own splash screen view
do your real loading only THEN
I was going to comment on #Warrior's answer but StackOverflow won't let me.
You shouldn't need to specify an iPhone 5 optimised image (I haven't for my app and it works), although if this is a new app I would recommend it.
Are you running it on an iOS 7 device?
I have noticed that Xcode allows you to add a 1x and 2x image specific to iOS 5 & 6 devices.
Otherwise all I can suggest is checking your dimensions (it must be a portrait sized image 640x960px) and be placed in the '2x' slot) and also make sure your info plist is pointing to the correct location.
Then as others have suggested, all you need to do to get a landscape image is have artwork that is rotated 90 degrees when your image is portrait.
The screen size and Icon size for iOS.
ICONS (iPhone and iPad)
29 x 29pt (1x and 2x)
40 x 40pt (1x and 2x)
50 x 50pt (1x and 2x)
57 x 57pt (1x and 2x)
60 x 60pt (2x)
72 x 72pt (1x and 2x)
76 x 76pt (1x and 2x)
NOTE: 2x is double the size of 1x images
SCREEN SIZE
iPhone 4s and earlier (3.5 inch)
320 x 480 pts
Retina
640 x 960 pts
iPhone 5 (4 inch)
320 x 568 pts
retina
640 x 1136 pixels
iPad protrait
768 x 1004
retina
1536 x 2008
iPad Landscape
1024 x 748
retina
2048 x 1496
OTHER IMAGE SLICING
All image slicing requires both 1x and 2x to work perfectly for retina and non retina displays.
NOTE: 2x is double the size of 1x images.
Normally you add both a portrait and landscape image to the asset catalog and the device chooses which one to use based on the current device orientation.
If your app only supports landscape then you only need to provide a landscape image, as long as you set the "Device Orientation" in your info plist to be "Landscape Left" and "Landscape Right" ONLY.
In that case, the user will always be presented with a landscape launch image and this will indicate to them that they need to rotate their device.
- Anthony

Resources