What's the easiest way to do a Splash Screen on ios? I always see different tutorials, and I can not. I just want to load an image for 3 seconds before entering my application
What's the easiest way to do a Splash Screen on ios? I always see different tutorials, and I can not. I just want to load an image for 3 seconds before entering my application
I suggest using Asset Catalogs. When creating a project, XCode already creates such a file (Images.xcassets). If your project does not, add one. Open the file and in the list on the left click with the right button and select "New Launch Image".
Thendragtheimagestothedevices/resolutionsyouwanttosupport.Intheright-mostview(Utilities)youcancheckthesizethateachimageshouldhave(ExpectedSize).Finally,gototheprojecttargetsscreenandselecttheassetLaunchImageasLaunchImagesSource.
The simplest way to increase the visibility time of the splash screen is to make the main thread sleep. Example:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
sleep(3.0);
return YES;
}
However this is not recommended by Apple as the app should be available as soon as possible.