在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 4.0中播放电影,同时保持与iPhone 3.1的向后兼容性?