Entering full screen in MPMoviePlayerController ca

2019-02-08 15:54发布

To play video in my app, I set MPMoviePlayerController and add it to subview. The user can change to full screen mode using pinch gesture.

In this viewController (that contains the Movie Player View), I set the viewWillDisappear to set objects to nil.

But, in iOS 6, when activating fullscreen mode the MPMoviePlayerController in the view controller that contains the Movie Player View calls the methods viewWillDisappear and viewDidDisappear.

In iOS5, those methods were not called.

3条回答
再贱就再见
2楼-- · 2019-02-08 16:29

I am not sure this is a question but in case someone has a problem with the issue herein stated, that is, someone using a viewController (that contains the Movie Player View), I found the solution:

I was using a view controller with the Movie Player Controller and then presented this view controller as a subview. I just got rid of it and used the MoviePlayer.view as a subview directly and it works just fine.

Not a problem with iOS 5, but now, it is. Fix it and enjoy!

查看更多
姐就是有狂的资本
3楼-- · 2019-02-08 16:41

To everyone has noticed that and having problem with this, I found this report in community Open Radar: http://openradar.appspot.com/12327997

查看更多
\"骚年 ilove
4楼-- · 2019-02-08 16:47

I came across this issue as well and it caused me a lot of headache. My temporary solution until the bug is fixed is to check the player's fullscreen Boolean value in viewWillDisappear: and/or viewDidDisappear:. If it returns YES, the movie is entering fullscreen mode and you should refrain from doing anything that might interrupt it.

查看更多
登录 后发表回答