Something like a loading screen

I don´t need to code a loading screen per se, but I’m interested in learning how can I show a Splash screen with my company’s logo while my app is loading it’s resources

Worth mentioning I would like this splash screen to be shown for some seconds even if the assets are already loaded.

Anyone knows how to achieve this effect? [import]uid: 151732 topic_id: 34351 reply_id: 334351[/import]

At the very beginning of your app load your splash screen. Then while everything else is loading you make sure your splash screen stays on top of everything, a few ways to do that, let me know if you need one. Then at the end of your code, after everything has loaded you do this:

timeTest = system.getTimer()  
if timeTest \> 5000 then  
 splashScreen:removeSelf()  
 splashScreen = nil  
elseif timeTest \< 5000 then  
 timer.performWithDelay( (5000 - timeTest), killSplashScreen, 1 )  
end  

5000 being equal to 5000 miliseconds or 5 seconds [import]uid: 77199 topic_id: 34351 reply_id: 136536[/import]

Thanks hatethinkingofnames.

Your method works, but on the very first time after installing, my splashscreen seems to take longer than it should to show up, making it vanish extremely fast. I don´t know if Corona does some behind the scenes setup on the first time you run an app, but it surely seems to be the case.

After the first time, this method seems to work flawlessly. [import]uid: 151732 topic_id: 34351 reply_id: 136545[/import]

Hi @guilovsh,
If you only need a static, non-animated splash screen on iOS, you can just drop a “Default.png” file into your project folder (screen size) and that will appear as your app initially loads. However, you won’t have much “control” over this, so many developers choose to omit that file and use a more comprehensive solution like @hatethinkingofnames suggests.

Brent [import]uid: 200026 topic_id: 34351 reply_id: 136554[/import]

Just a quick note: The static Default.png will also be loaded on Android builds as well.
I requested this feature last year, which was included in a Corona build quite some time ago… [import]uid: 70847 topic_id: 34351 reply_id: 136557[/import]

At the very beginning of your app load your splash screen. Then while everything else is loading you make sure your splash screen stays on top of everything, a few ways to do that, let me know if you need one. Then at the end of your code, after everything has loaded you do this:

timeTest = system.getTimer()  
if timeTest \> 5000 then  
 splashScreen:removeSelf()  
 splashScreen = nil  
elseif timeTest \< 5000 then  
 timer.performWithDelay( (5000 - timeTest), killSplashScreen, 1 )  
end  

5000 being equal to 5000 miliseconds or 5 seconds [import]uid: 77199 topic_id: 34351 reply_id: 136536[/import]

Thanks hatethinkingofnames.

Your method works, but on the very first time after installing, my splashscreen seems to take longer than it should to show up, making it vanish extremely fast. I don´t know if Corona does some behind the scenes setup on the first time you run an app, but it surely seems to be the case.

After the first time, this method seems to work flawlessly. [import]uid: 151732 topic_id: 34351 reply_id: 136545[/import]

Hi @guilovsh,
If you only need a static, non-animated splash screen on iOS, you can just drop a “Default.png” file into your project folder (screen size) and that will appear as your app initially loads. However, you won’t have much “control” over this, so many developers choose to omit that file and use a more comprehensive solution like @hatethinkingofnames suggests.

Brent [import]uid: 200026 topic_id: 34351 reply_id: 136554[/import]

Just a quick note: The static Default.png will also be loaded on Android builds as well.
I requested this feature last year, which was included in a Corona build quite some time ago… [import]uid: 70847 topic_id: 34351 reply_id: 136557[/import]