Question

I noticed some iPhone apps give you the title screen instantly. Then there are some apps that gives you a black/blank screen for a brief moment.

I have the latter issue, but its lasting about 2 seconds. I would like to display a PNG image (over 200 KB size) and a loading indicator view.

My app is based on UIView. The specified a custom UIView that basically loads and renders the said image as the wallpaper.

I tried not loading this image, yet im still getting a 2 second delay time to load. The app delegate basically sets the view controller's view as a subview.

This delay is only seen on the device, not on the simulator. What am i over-seeing?

Was it helpful?

Solution

If you place a Default.png file in your mainbundle, it gets displayed at launch time between the time that the app is tapped on till the time that you replace it with another view.

The reason you don't see it in the simulator is because it is faster at loading your app.

If you want to display a progress indicator, you will only be able to do it once the appDidFinishLaunching is called, but the delay that you are seeing is still there.

One trick I use is to have the same Default.png displayed again in appDidFinishLaunching and then draw a progress bar on top of that. Sure there is still the static display during the initial delay, but from there until all my initial views are loaded, I display a progress bar.

There have been some recent discussions about this on StackOverflow that you should see. And see this: How To Make Your iPhone App Launch Faster

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top