嗯,我可以找到關於相同或相似問題和答案的許多問題......但是,沒有任何東西可以幫助我。只有當我不使用屬性「controlStyle」作爲「MPMovieControlStyleFullscreen」時,「完成」按鈕才起作用。我想這樣..當全屏模式下,MPMoviePlayerController中的「完成」按鈕不起作用
MPMoviePlayerController *mpMoviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:@"https://dl.dropbox.com/u/14218997/thxq.mp4"]];
mpMoviePlayerController.controlStyle = MPMovieControlStyleNone;
[mpMoviePlayerController setUseApplicationAudioSession:NO];
[mpMoviePlayerController setScalingMode:MPMovieScalingModeAspectFit];
[mpMoviePlayerController setFullscreen:YES animated:YES];
[mpMoviePlayerController.view setFrame:CGRectMake(0, 0, 1024, 768)];
[[globalSingleton paintingView] addSubview:mpMoviePlayerController.view];
[mpMoviePlayerController prepareToPlay];
[mpMoviePlayerController play];
mpMoviePlayerController.controlStyle = MPMovieControlStyleFullscreen;
或這樣..
MPMoviePlayerController *mp;
MPMoviePlayerViewController *mpVC = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:@"https://dl.dropbox.com/u/14218997/thxq.mp4"]];
mp = [mpVC moviePlayer];
mp.controlStyle = MPMovieControlStyleFullscreen;
mp.fullscreen = NO;
mp.useApplicationAudioSession = NO;
mp.view.frame = CGRectMake(0, 0, 1024, 768);
[[globalSingleton paintingView] addSubview:mp.view];
([globalSingleton paintingView]只是爲代表的主要觀點。我已經簽有它沒問題。)
請分享你對這個問題的瞭解。 Thx提前!