Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entering full screen in MPMoviePlayerController calls viewWillDisappear and viewDidDisappear

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.

like image 614
Yudmt Avatar asked Sep 26 '12 15:09

Yudmt


2 Answers

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.

like image 95
lobianco Avatar answered Sep 19 '22 18:09

lobianco


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

like image 39
Yudmt Avatar answered Sep 17 '22 18:09

Yudmt