Я добавил фильм на мой взгляд, и он просто начинает играть автоматически, кто-нибудь знает, как остановить это?Фильм начинается автоматически?
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]];
или способ ObjC .. [moviePlayer setShouldAutoplay: NO]; – stackr