このコードをviewDidLoad
メソッドに追加しました:
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"myvid" ofType:@"m4v"];
NSURL *movieURL = [NSURL fileURLWithPath:moviePath];
MPMoviePlayerController* moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
moviePlayer.controlStyle = MPMovieControlStyleNone;
[self.view insertSubview: moviePlayer.view aboveSubview: self.view];
[moviePlayer play];
うまくいきません!iOS のビューのバックグラウンドでビデオを再生するにはどうすればよいですか? (ストーリーボードを使用)