题
我想把一部电影在我的应用程序的开始但我想要隐藏的影控制(停,播放,接下来和...)在这里是我的代码:
#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
不隶属于 StackOverflow