iPhone development. Intro video.

Did you try to add some intro videos into you iPhone applications? Have you got some problems with it?

I had a bit one concerned with the device orientation.
The whole application was designed for a portrait mode. But when I tried to play animation in the method
- (void)applicationDidFinishLaunching:(UIApplication *)application;
 it was played by default in a landscape mode. I have rotated video immediately after starting but as a result a black square appeared for a second before animation.

So, here comes my solution:

  1. Remove [window makeKeyAndVisible] from applicationDidFinishLaunching.
  2. Add window.hidden = YES before playing the video.
  3. Add [window makeKeyAndVisible] after finishing video processing.
That's all. Thanks.