1

我的问题是,我有一个MPMoviePlayerViewController嵌入在一个modalviewcontroller有一个表格属性,当视频去全屏使用捏或控件不工作的箭头。UIModalPresentationFormSheet中的MPMoviePlayerViewController问题

我已经知道,他们不工作,因为只有在矩形内使modalviewcontroller被注册。例如,双击可放大矩形作品的内部,而其他任何地方都不会。

这是一个问题,因为由于这个问题无法使用电影控件。谁能帮忙?

+0

我终于明白了。它只在里面工作,因为电影播放器​​在模态视图内,只允许在视图内部进行交互。该视频完全全屏显示,因此交互只发生在模态视图所在的位置。为了解决这个问题,我使用电影播放器​​通知在进入全屏和退出全屏时更改了模式视图大小。 – Pete42 2011-06-23 05:47:57

回答

1

这是我如何解决它。当视频进入全屏模式时,我改变了模态视图控制器的大小。

- (无效)movieDidEnterFullscreen:(NSNotification *)通知{

NSLog(@"did enter"); 

self.navigationController.view.superview.frame = CGRectMake(0, 0, 1500,1500); 

self.navigationController.view.superview.center = self.view.center; 

[mpviewController moviePlayer].controlStyle = MPMovieControlStyleDefault; 

}

- (无效)movieDidExitFullscreen:(NSNotification *)通知{

NSLog(@"did exit"); 

UIDevice *device = [UIDevice currentDevice]; 
[device beginGeneratingDeviceOrientationNotifications]; 

if (([device orientation] == UIDeviceOrientationLandscapeLeft) || ([device orientation] == UIDeviceOrientationLandscapeRight)){ 
    self.navigationController.view.superview.frame = CGRectMake(0, 0, 620,540); 
    self.navigationController.view.superview.center = CGPointMake(384, 512); 
} 

else { 

    self.navigationController.view.superview.frame = CGRectMake(0, 0, 540,620); 
    self.navigationController.view.superview.center = CGPointMake(384, 512); 

} 


[mpviewController moviePlayer].controlStyle = MPMovieControlStyleEmbedded; 

}

相关问题