Splash screen on Ios

Asked

Viewed 456 times

2

What’s the easiest way to make a splash screen on Ios? I always see different tutorials, and I can’t. I just want to upload an image for 3 seconds before entering my application

1 answer

1


I suggest using Asset Catalogs. When creating a project, Xcode already creates such a file (Images.xcassets). If your project does not have one, add one. Open the file and in the list on the left right click and select "New Launch Image".

inserir a descrição da imagem aqui

Then drag the images to the devices/resolutions you want to support. In the right view (Utilities) you can check the size each of the images should have (Expected Size). To finish, go to the project targets screen and select Asset Launchimage as Launch Images Source.

inserir a descrição da imagem aqui

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.

  • I did this, and the error when compiling:he Launch image set named "Launchimage" Did not have any applicable content."

  • You know what it can be?

  • Make sure the images you have placed are exactly the expected size (select each configuration and check the field "Expected Size")

Browser other questions tagged

You are not signed in. Login or sign up in order to post.