Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto hide UIPopoverController when UIWebView plays a fullscreen youtube movie?

Please see the picture. After pressing the fullscreen button, the webview maximizes behind the UIPopover.

http://cl.ly/2V1r0i2w3v3z0z2b1X1n

I tried to look out for MPMoviePlayerDidEnterFullscreenNotification, no luck.

I really don't want to ship my own UIPopoverController but this is my only "solution" at the moment. Using anything other than UIWebView is also not an option, as I am displaying YouTube-Movies.

Edit: I use a UIWebView, so there is no way to access the views/classes that are used internally.

like image 222
steipete Avatar asked Apr 08 '11 02:04

steipete


1 Answers

According to this answer you can listen for UIMoviePlayerControllerDidEnterFullscreenNotification

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youTubeStarted:) name:@"UIMoviePlayerControllerDidEnterFullscreenNotification" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youTubeFinished:) name:@"UIMoviePlayerControllerDidExitFullscreenNotification" object:nil];
like image 157
jjv360 Avatar answered Sep 20 '22 10:09

jjv360