私は自分のビューにムービーを追加しただけで自動的に再生を開始しますが、これを止める方法は誰にも分かりますか?ムービーが自動的に再生を開始しますか?
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