开发者

Playing movie in iPhone 3.1 and 4.0

In iPhone 3.1 I used the following code to play a movie:

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]; 

For some reason this does not work anymore in iPhone 4.0 (go Apple!). How should I play a movie in iPhone 4.0 开发者_如何学Pythonwhile retaining backward-compatibility with iPhone 3.1?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜