views:

195

answers:

2

I want to add a loading bar at the initial of the game which is customized loading bar. for that i need to calculate the loading percentage to show loading progress. Is there any way to calculate the loading time of the application? please help me.

If i add Default.png in my resources folder, it will seen at the time of application loading. How it works? I want to customize it.

+1  A: 

You can change the Default.png to your liking and even exchange it between application starts, but it's still a static image that cannot be animated. It's displayed while the iPhone OS is bootstrapping your application. Once the application enters your own main function, you can display whatever you want - from this point on, what's loaded and what's displayed is under your control.

Regarding progress display, I can only speak from a game developers point of view. Normally, you know how many resources you're loading (textures, sound files,...) so you can load e.g. one resource per main-loop pass and display the progress accordingly.

digitalbreed
I'm not sure about being able to change the Default.png. It's part of your application bundle, which should be read-only. Even if you could change it, it seems like it would alter the cryptographic signature of your application.
Brad Larson
When I tinkered with iPhone development end of last year, there was a flaw in the codesign tool which doesn't follow symlinks. That way, you can point a symlink to an arbitrary file and replace it's contents on the fly without making the sealed app invalid.
digitalbreed
+1  A: 

I think your progress bar needs to be based on progress and not time. Remember that some hardware is faster than others. The 2G iPod touch is the fastest with (I think) the original iPhone the slowest.

Your Default.png image is entirely static. Sounds like you'd take a screenshot of your loading screen when it has zero progress and use that.

Stephen Darlington