0
전환을 추가하는 방법을 알고 싶습니다 (비디오가 시작될 때 페이드 인하 고 비디오가 끝나면 페이드 아웃).moviePlayBackDidFinish 및 전환 효과
이 작업에 그를 도와 주 시겠어요, 나는 종류의 전환으로 잃었어요, 결코/전에 그것으로 재생할 수 없습니다 : 여기
당신은의 스크린 샷을 캡처 할 수있는 내 코드- (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];
}
내가 그것을 얻을하지 않습니다를 ... 내가 원하는 그것은 인/아웃 효과에 페이드를 적용 할 때 비디오/이미지 시작될 것입니다. 나를 도와 주셔서 고마워! – user1256827
기본적인 페이드 인/페이드 아웃은 알파 값에 애니메이션을 적용하여 얻을 수 있습니다. 나는 내 대답을 편집 할 것이다. – calimarkus