Ich habe meiner Ansicht einen Film hinzugefügt und es beginnt einfach automatisch zu spielen, weiß jemand, wie man das aufhört?Film beginnt automatisch zu spielen?
MPMoviePlayerController *moviePlayer;
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"LAN_S9" ofType:@"mp4"];
if (moviePath)
{
NSURL *movieURL = [NSURL fileURLWithPath:moviePath];
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
[[moviePlayer view] setFrame: CGRectMake(0, 0, 400, 200)]; // frame must match parent view
}
[self.view addSubview: [moviePlayer view]];
oder die ObjC Art und Weise .. [moviePlayer setShouldAutoplay: NEIN]; – stackr