title: Iphone : Video playing at startup doesn't quit
body: <p>i made a video playing when my app loads however it doen't quit after playing even if you prees "Done". What am i doing wrong?</p>
  
  <pre><code>- (void)viewDidLoad {
  NSBundle *bundle=[NSBundle mainBundle];
  NSString *moviePath = [bundle pathForResource:@"Video Logo Final" ofType:@"mp4"];
  NSURL *movieURL=[[NSURL fileURLWithPath:moviePath] retain];
  MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
  theMovie.scalingMode = MPMovieScalingModeAspectFill;
  theMovie.view.frame = CGRectMake(0.0, 0.0, 320.0, 480.0);
  [self.view addSubview:theMovie.view];
  [theMovie play];
  [super viewDidLoad];  }
  </code></pre>
  
  <p>Also, i made a try to put the same code in "application didFinishLaunchingWithOptions" but i get a warning at "[self.view addSubview:theMovie.view];"
  Ay ideas about that?</p>
  
  <p>p.s. As you probably guessed i am very new to programming, any help would be really appreciated...</p>