This tutorial will show you how to easily create a timed splash screen for your iPhone application.
I have had a few people ask me about this in the past and as the result of a recent request I have decided to finally write a little tutorial which shows you how to control how long your splash screen is shown for.
This tutorial assumes you are using director.
Step 1 - Open main.lua and put in the following line above your main function;
splash = display.newImage("Default.png")
Step 2 – Add these two lines within your main function;
splash = nil
Step 3 - Change main() (which appears at the end of your main.lua file when using director) to;
timer.performWithDelay(5000, main, 1)
And that’s it!
Your splash screen will show for an additional 5 seconds before you change to whatever scene/screen you have designated in your main() function, as per usual.
It’s important to note that even if you have your status bar set to hidden in build.settings this will not be reflected in the Corona SDK simulator. Build for the Xcode simulator to see it properly. (In the simulator the status bar disappears only after the initial splash screen has disappeared, on device it will not be shown if your settings are correct.)
PS – Have you liked Techority on Facebook yet? If not, please do so now using the widget on the right