开发者

MPMoviePlayerControll doesn't detect touch when in fullscreen mode

I have subclassed MPMoviePlayerController...

@interface CustomMoviePlayerController : UIViewController 
{   
    NSURL *movieUrlPath;
    MPMoviePlayerController *mp;    
...

I also have iPad application (with sp开发者_如何学GolitView). On the right side in the center I load this player and start playing movie...

cPlayer = [[CustomMoviePlayerController alloc] initWithUrlPath:title];          
    [self.view addSubview:cPlayer.view];        
    [cPlayer readyPlayer:title];

I have touchBegin/End methods that detect touch on this player and it works, but when I set player in fullscreen it stop detect toucher. Why touches stop detecting in fullscreen?

[cPlayer.mp setFullscreen:YES animated:YES];


When the player enters fullscreen mode, it's no longer attached to the view, but to a new window.

You could listen to MPMoviePlayerDidEnterFullscreenNotification and MPMoviePlayerDidExitFullscreenNotification to do stuff when the player enters fullscreen mode. You could get the player window with [[UIApplication sharedApplication] keyWindow] and add an overlay view with gestures recognizers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜