Frage

i setzen will einen Film in meiner Anwendung starten, aber ich mag wie die Film Kontrollen verstecken (Stop, Play, Vor und ...) hier ist mein Code:

#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];
}
War es hilfreich?

Lösung 2

Ok, ich es herausgefunden.

Code:

IntroMovie.movieControlMode = MPMovieControlModeHidden;

Andere Tipps

Sie können tun IntroMovie.controlStyle = MPMovieControlStyleNone;

Da .movieControlMode aufgegeben.

In Objective-C

moviePlayer.controlStyle = MPMovieControlStyleNone;

In Swift

 moviePlayer.controlStyle = MPMovieControlStyle.None
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top