0

アプリケーションの起動時にムービーを配置したいのですが、(stop、play、next、...)のようなムービーコントロールを非表示にしたいのですが、ここに私のコードがあります:

#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];
}
4

3 に答える 3

3

あなたができるIntroMovie.controlStyle = MPMovieControlStyleNone;

.movi​​eControlModeが非推奨になったため。

于 2012-05-23T23:09:59.470 に答える
2

わかりました、私はそれを理解しました。

コード:

IntroMovie.movieControlMode = MPMovieControlModeHidden;
于 2009-11-02T15:31:02.713 に答える
0

Objective-Cで

moviePlayer.controlStyle = MPMovieControlStyleNone;

スウィフトで

 moviePlayer.controlStyle = MPMovieControlStyle.None
于 2015-03-03T13:46:16.237 に答える