直到昨天我MPMovieController在iPhone SDK 3工作呢罚款。 不过,昨天当我升级了TI SDK iPhone的SDK 4我movieplayer停止工作,它给我上以下行产生警告(他们不赞成大量的方法)
moviePlayer.movieControlMode = MPMovieControlModeDefault;
我完整的代码如下:
NSURL *fileURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/videos/%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"SERVICE_URL"]
,customObject.movieURL]];
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
if (mp)
{
// save the movie player object
self.moviePlayer = mp;
moviePlayer.movieControlMode = MPMovieControlModeDefault;
[mp release];
// Apply the user specified settings to the movie player object
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(myMovieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayer];
// Play the movie!
[self.moviePlayer play];
}
请告诉我,而不是取代过时的方法,哪种方法还是应该做不同的事情?
谢谢 ,