This guide outlines how to customize a
As the foundation for this guide, please use our project template which contains the basic required files.
Download the project template launchimage-master.zip
)
Double click on the LaunchImage.xcodeproj
file to launch Xcode.
Xcode is a powerful and comprehensive development tool which may seem overwhelming. Fortunately, our project template considerably streamlines the configuration process. Assuming you've downloaded and opened the template as outlined above, simply follow these steps:
If the Navigator is not visible, reveal it via
Assets.xcassets
entry:UIImageView
while maintaining the original aspect ratio.We include three sample images within the project template package which you can use for testing.
Save/copy the three images to your Corona project's root folder main.lua
)Launch.png
, [email protected]
, and [email protected]
respectively.
Back in Xcode, in the central pane, select the Launch
entry:
Launch.png
into the 1x slot, [email protected]
into the 2x slot, and [email protected]
into the 3x slot:LaunchScreen.storyboard
file:In the center pane, if you select
Before exporting, ensure that LaunchScreen.storyboard
is still selected in the
It's critical that you select
LaunchScreen.storyboardc
folder for your project.To ensure that you did everything properly, please follow this checklist:
In the Finder, navigate to your Corona project's root folder.
Inside, check for a LaunchScreen.storyboardc
file. If it doesn't exist, you may have forgotten to choose the proper location
Get further information on the LaunchScreen.storyboardc
file
Check that the folder contains the three images which will be used for the launch screen: Launch.png
, [email protected]
, and [email protected]
. If these files don't exist, you may have forgotten to save/copy them to the root folder.
One final aspect is required to link up your new compiled storyboard package with the Corona project:
Open the Corona project's build.settings
file.
Within the iphone
→ plist
table, add a UILaunchStoryboardName
key with a value of "LaunchScreen"
:
settings = { iphone = { plist = { CFBundleIconFiles = {}, -- Required! UILaunchStoryboardName = "LaunchScreen", -- Required! }, }, }
build.settings
file.If you have a UILaunchImages
key and associated plist
table UILaunchStoryboardName
key supersedes it and the LaunchScreen.storyboardc
file will control all of your launch screens.
An alternative method to creating a LaunchScreen.storyboardc
file is to include a set of static images within your project folder, then link them up within the project's build.settings
file. These images must adhere to the names/sizes indicated below and they must be placed in the project's root directory alongside main.lua
.
If you have followed the steps above to create a
File | Size (w×h) | Orientation | Target Devices |
---|---|---|---|
[email protected] |
640 × 960 | portrait | iPhone 4s |
[email protected] |
640 × 1136 | portrait | iPhone 5 / 5s |
[email protected] |
1136 × 640 | landscape | iPhone 5 / 5s |
[email protected] |
750 × 1334 | portrait | iPhone 6 / 6s / 7 |
[email protected] |
1334 × 750 | landscape | iPhone 6 / 6s / 7 |
[email protected] |
1242 × 2208 | portrait | iPhone 6 Plus / 6s Plus / 7 Plus |
[email protected] |
2208 × 1242 | landscape | iPhone 6 Plus / 6s Plus / 7 Plus |
Default-Portrait.png |
768 × 1024 | portrait | iPad 2 / 3, iPad Mini 1 |
Default-Landscape.png |
1024 × 768 | landscape | iPad 2 / 3, iPad Mini 1 |
[email protected] |
1536 × 2048 | portrait | |
[email protected] |
2048 × 1536 | landscape | |
[email protected] |
2048 × 2732 | portrait | iPad Pro 12" |
[email protected] |
2732 × 2048 | landscape | iPad Pro 12" |
Once you've added these files to your project folder, you must specify their existence and other definitions in the UILaunchImages
table of build.settings
:
settings = { iphone = { plist = { -- Required launch image files/definitions table UILaunchImages = { { -- iPhone 4 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 4 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 4 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 5 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPhone 5 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPhone 5 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPhone 6 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPhone 6 Plus LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-Landscape-736h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPhone 6 Plus LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-Landscape-736h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPad Pro Portrait ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Portrait-1366", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{1024, 1366}" }, { -- iPad Pro Landscape Right ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Landscape-1366", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{1024, 1366}" }, { -- iPad Pro Landscape Left ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Landscape-1366", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{1024, 1366}" }, }, }, }, }