Separate launch images for iPad? - ios

I'm working on an update to bring my iPhone app to iPad. (to make it a universal app)
Currently I have the following launch images:
Default.png - 320 x 480 px
Default#2x.png - 640 x 960 px
Default-568h#2x.png - 640 x 1136 px
Default-667h#2x.png - 750 x 1334 px
Default-736h#3x.png - 1242 x 2208 px
Do I need to add separate launch images for the iPad?
The app should support all devices with iOS 8 and is currently portrait mode only.

Yes, you need add separate launch images for the iPad.
As you support only portrait mode you need add only two images:
1. Default~ipad.png 1024x768 px
2. Default#2x~ipad.png 2048x1536 px
Also you can use alternative way for launch images: LaunchScreen.xib (Xcode -> File -> New -> File... -> User Interface -> LaunchScreen).
It's suitable way when your launch screen can be built in interface builder. It will allow avoid storing multiple launch images in the project, so it makes your app thinner.

Related

ios background images sizes and naming in xamarin

I am using xamarin.forms to develop an app. The app has screens with background images. So to have proper background's i referred to the ios documentation here with taking dimensions of the launch/splash screen into consideration as they are like background images, but this doesn't work. This is what i follow:
iPhone
320 x 480 Default.png
640 x 960 Default#2x.png
640 x 1136 Default-568h#2x.png
750 x 1334 Default-667h#2x.png
1242 x 2208 Default-736h#3x.png
2208 x 1242 Default-Landscape#3x.png
iPad
768 x 1024 Default-Portrait.png
1536 x 2048 Default-Portrait#2x.png
1024 x 768 Default-Landscape.png
2048 x 1536 Default-Landscape#2x.png
the images in iphone 6 (iOS 9.0) are repeating.
EDIT:
I needed the naming convention and sizes for the image to be used as background images in xamarin.forms content page.
Any help on this sizes and naming?
I have also been struggling with this, it seems like the iPhone 6 (Plus) screens aren't implemented in Xamarin.Forms.
LaunchScreen
This is probably because Apple themselves are recommending the use of Storyboards and/or XIB files for your LaunchScreen as of iPhone 6, or better yet iOS 8.
I quote:
In iOS 8 and later, you can create a XIB or storyboard file instead of
a static launch image. When you create a launch file in Interface
Builder, you use size classes to define different layouts for
different display environments and you use Auto Layout to make minor
adjustments. Using size classes and Auto Layout means that you can
create a single launch file that looks good on all devices and display
environments.
This, in fact, is supported by Xamarin.Forms.
Just create a StoryBoard in your Resources file, configure your splash screen and select it as LaunchScreen in your info.plist file.
Advantage is that it works for all devices.
Background images
As for background images, according to the Xamarin iOS documentation this should work.
If it doesn't for Xamarin.Forms you should probably report a bug.
Meanwhile you could use a custom renderer like underneath, taken from the Xamarin Forums or check another suggestion from that thread:
[assembly: ExportRenderer(typeof(InfoPage), typeof(InfoPage_iOS))]
namespace Oxaco_BBC.iOS
{
public class InfoPage_iOS : PageRenderer
{
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(false);
UIGraphics.BeginImageContext(this.View.Frame.Size);
UIImage i = UIImage.FromFile("Background.png");
i = i.Scale(this.View.Frame.Size);
this.View.BackgroundColor = UIColor.FromPatternImage(i);
}
}
}

Different Launch Image iPhone 6 and iPhone 4s

iPhone 4 and iPhone 6, when using image cassettes in a xib, use the same #2x image. Is it possible to use different images for each and not use scaled mode for windows 6/6+? I am trying to use a full screen image for each and the iPhone 6 image doesn't scale down correctly, and the iPhone 4 image doesn't scale up correctly.
For the launch image you can use the assets folder with the device specific launch images.
Here you can set the Retina HD 4.7 Launchscreen for the iPhone 6
1x = 320 x 480
2x = 640 x 960 - iPhone 4
Retina 4 = 640 x 1136 - iPhone 5
Retina HD 4.7 = 750 x 1334 - iPhone 6
Retina HD 5.5 = 1242 x 2208 - iPhone 6+
EDIT
Go to the General Settings Of your project and check your settings make sure you have selected the assets folder. Remove the Launch Screen File text.

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: Unable to set LaunchImage

I have LaunchImage.png file in my iPhone Xcode 5.1 project. I have added LaunchImage.png in app .plist file. I have drag and dropped this file in LaunchImage image xcassets. But, still it is throwing error as when build xcode project
/Users/MyApplication/Images.xcassets: The launch image set named "LaunchImage" did not have any applicable content.
What could be the reason, please help!
Thank yoU!
This is due to the dimension of the image. Before the error, there is a warning message also check out that .
From Doc
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) For iPad
portrait:
1536 x 2048 pixels 768 x 1024 pixels (standard resolution) For iPad
landscape:
2048 x 1536 pixels 1024 x 768 pixels (standard resolution)
Set your LaunchImage.png as a Default.png and also drag and dropped this file in LaunchImage image xcassets.

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