我想把一部电影在我的应用程序的开始但我想要隐藏的影控制(停,播放,接下来和...)在这里是我的代码:

#import <MediaPlayer/MediaPlayer.h>



-(void)viewDidLoad
{
     NSBundle *bundle = [NSBundle mainBundle];
     NSString *moviePath = [bundle pathForResource:@"myvideo" ofType:@"mp4"];
     NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
     MPMoviePlayerController *IntroMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
     [IntroMovie play];
}
有帮助吗?

解决方案 2

好,我想出来。

代码:

IntroMovie.movieControlMode = MPMovieControlModeHidden;

其他提示

你可以做的 IntroMovie.controlStyle = MPMovieControlStyleNone;

自那以后。movieControlMode被废弃了。

<强>在Objective-C

moviePlayer.controlStyle = MPMovieControlStyleNone;

<强>在夫特

 moviePlayer.controlStyle = MPMovieControlStyle.None
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top