i would like to know how to add a transition ( fade in when the video is getting to start and fade out when the video is finished ).
Could you please help him in this task, i'm kind of lost with transition, never play with it before /:
here is my code
- (void) startSlideShow
{
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle]
pathForResource:@"2" ofType:@"mov"]];
MPMoviePlayerController *moviePlayer =
[[MPMoviePlayerController alloc] initWithContentURL:url];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayer];
moviePlayer.view.frame = CGRectMake(0, 0, 768, 1024);
moviePlayer.controlStyle = MPMovieControlStyleDefault;
moviePlayer.shouldAutoplay = YES;
[self.view addSubview:moviePlayer.view];
[moviePlayer setFullscreen:YES animated:YES];
}
-(void)moviePlayBackDidFinish: (NSNotification*)notification
{
MPMoviePlayerController *moviePlayer = [notification object];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayer];
if ([moviePlayer respondsToSelector:@selector(setFullscreen:animated:)])
{
// the transition should be around here... (fade out)
[moviePlayer.view removeFromSuperview];
}
[moviePlayer release];
[self checkResources];
}