2
我只想在iPhone SDK.40(MPMoviePlayerViewController)中以横向模式播放视频。它不应该支持纵向模式回放。我们如何做到这一点。MPMoviePlayerViewController仅在横向模式下播放电影
我只想在iPhone SDK.40(MPMoviePlayerViewController)中以横向模式播放视频。它不应该支持纵向模式回放。我们如何做到这一点。MPMoviePlayerViewController仅在横向模式下播放电影
,我发现这个文件在这里:
所以基本上你只需要创建自己的MPMoviePlayerViewController的子类并覆盖shouldAutorotateToInterfaceOrientation:方法,就像这样:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}
同意安德鲁我做了同样的事情 – harshalb 2010-07-09 08:55:58
@andrew:我也使用你的方法,但有时它仍然在肖像模式下播放视频 – QViet 2011-07-26 10:44:00