2011-02-04 99 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