I want to play a movie file or any animation file till the time application not loaded completely.
Is there any simple way to do it?

- 41,764
- 65
- 238
- 329

- 2,970
- 7
- 33
- 43
-
Did you find a workable answer to this question? – Chris Apr 04 '11 at 17:19
5 Answers
Telling other people what they want to do is questionable. My client WANTS a movie to play and it's only a 3 second movie. It's called branding and if his users don't like it, they'll tell him.

- 6,388
- 2
- 28
- 34
Have any of you guys seen Storm 8's iPhone apps? They play movies at startup and it's pretty slick. In fact a lot of games do this. It's not an unreasonable question and I'd like to know how to do it too.

- 471
- 3
- 8
You have to think carefully about if you really want to do this. On a hardware limited device, loading a movie is going to increase load times, not reduce them as should be your goal. Even the Default.png method is meant as a way to indicate the application is loading and reduce the perceived load time to the user; it's not intended as a splash screen or eye candy.
If your application does have a very long operation during load that you absolutely can't avoid before showing a functional UI, I think the best bet might be to whip up a quick 'loading' animation using Core Animation layers. Maybe there's a better way to do it but in my experience loading the movie player takes time.

- 40,399
- 3
- 75
- 82
-
2While I agree with your point here, this is a poor answer since you are trying to talk the OP out of a solution instead of answering his question. – Nik Reiman Feb 03 '11 at 13:13
Depends on what you mean.
The iPhone shows a still image (Default.png) while the application loads, prior to your code getting any control.
Once your code has control, you can use MPMoviePlayer to play a video. You could launch a separate thread to do whatever takes so long that you want to hide it behind a video...
The only way to play a movie is to use the MPMoviePlayer. This takes over the UI and is full screen -- none of your app will show through until the movie is closed.
While it sounds cool to have a movie play while the app is loading, on the iPhone, it's really not practical. This is not something you want to do.

- 12,139
- 3
- 29
- 30