iPhone Development: Splash screens

Splashscreen for Linnaeus Pro iPhone Application
Aug
24

For this first in a series of iPhone development tutorials we take a look at how you can create your own splashscreen for your application. It's easy to do and requires very little time to accomplish.

For the first step in adding your own splash screen you will need to create your graphic as a 320x480 image and must save it in a PNG format. Also, be sure to save it as Default.png as the filename plays an important part of adding splash screens. In this example I've used a sample the splash screen for Linnaeus Pro (a wildlife watching/recording application) which should be available from the AppStore shortly.

Linnaeus Pro splash screen Next you need to open your iPhone project in Xcode so that you can see the project window with the files that make up your project listed. On the left hand side of the screen where there is a tree list for Classes, Other Sources, Resources, etc. you will need to right-click on the "Resource" folder to bring up the contextual menu.

Once the contextual menu has appeared, go to "Add" and then to "Existing Files..." then navigate to where your Default.png is saved, select the file and click the "Save" button.

Now that is actually all there is to it - when you view your application in the simulator or on your phone you will see the splash screen appear whilst your application is loading. Remember though that it is case-sensitive so it does matter how you name the file. The reason this works is a little method that Apple built in to help disguise applications that take longer to load. I have read that Apple's intention is that you have a screenshot of your application as the file whilst it is loading so that it has the appearance of already being loaded. There is no reason why you have to do this though and people do prefer to have the splash screen instead.

If you want your splash screen to appear for longer then there is something you can do to achieve this. Normally this shouldn't be a problem unless your application is so fast at loading that no one ever gets to see the image - it is these cases where you might want to delay the loading. If you do choose to do this then I would recommend making sure that the total display time for the splash screen is no longer than 2 to 3 seconds - any longer and your users may start to get annoyed. The trick is to use an NSTimer object with a modal window containing just your splashscreen so that you can define how long it will appear for before returning to the actual application. If you are unsure how to display a View Controller with just an image in then this will be covered in a later tutorial.

So, to recap:

  1. Create 320x480 PNG image
  2. Save as Default.png
  3. Add as an existing resource to your project

Quot Erat Demonstrandum.

your comments - Post a comment

salmo

how about tutorial on how to lead a splash movie

salmo commented 3 months ago
David G. Paul

sounds like a good idea, I'll try and get round to writing one as soon as possible

David G. Paul commented 3 months ago
blog comments powered by Disqus