I've made a game that uses cocos2d to display graphics, and uses a lot of MPMoviePlayerController to display cutscenes.
The problem is - the game stopped working on iOS 4.3. It was fine up until iOS 4.2, but 开发者_开发技巧on iOS 4.3 the movies play OK, the gameplay also happens, but the screen is all black when not playing the movies.
I have a hard time tracking the problem. Suggestions?
Edit: I narrowed the thing down to MPMoviePlayerController - if I disable it, everything is fine. I guess something changed in 4.3?
MPMoviePlayerController's view is clear in 4.0-4.2, and black in 4.3 by default, what helped was:
MPMoviePlayerController* moviePlayer = ...
moviePlayer.view.backgroundColor = [UIColor clearColor];
MPMoviePlayerController* moviePlayer = ...
[moviePlayer.backgroundView setBackgroundColor:[UIColor whiteColor]];
// or set need color
read more in "MPMoviePlayerController Class Reference"
精彩评论