1

iPhone 3.1 では、次のコードを使用してムービーを再生しました。

moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
moviePlayer.movieControlMode = MPMovieControlModeDefault;
moviePlayer.backgroundColor = [UIColor blackColor];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer];  
[moviePlayer play]; 

何らかの理由で、これは iPhone 4.0 では機能しなくなりました (Apple に行きましょう!)。iPhone 3.1 との下位互換性を維持しながら、iPhone 4.0 でムービーを再生するにはどうすればよいですか?

4

0 に答える 0