2011-02-04 43 views
0

我有子类的MPMoviePlayerController ...MPMoviePlayerControll没有检测到触摸时,在全屏模式下

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

我也有iPad应用(与SPLITVIEW)。在右侧中间我加载此播放器,并开始播放电影......

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

我有一个发现这个播放器触摸touchBegin/End方法和它的作品,但是当我设置全屏播放它停止检测到toucher。为什么触摸全屏停止检测?

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

回答

4

当玩家进入全屏模式时,它不再附加到视图,而是附加到新窗口。

当玩家进入全屏模式时,您可以收听MPMoviePlayerDidEnterFullscreenNotificationMPMoviePlayerDidExitFullscreenNotification做些事情。您可以使用[[UIApplication sharedApplication] keyWindow]获取播放器窗口,并添加带手势识别器的叠加视图。

+0

Thnaks this saved the day :) ... [cPlayer.mp setFullscreen:YES animated:YES]; \t \t UIView * v = [[UIApplication sharedApplication] keyWindow]; \t [v addSubview:myOverlayChannelPicker]; – 1110 2011-02-04 14:46:11