我在 detailView(UIVIew) 中创建了一个 MPMoviePlayerController,现在我想在用户单击 FullScreen 按钮时强制 MPMoviePlayerController 为横向视图。我可以这样做吗?请给我任何建议。在此先感谢。这是我要创建的代码:
NSURL *movieURL = [NSURL URLWithString:previewString];
movieController = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
[movieController.view setFrame:CGRectMake(10,130, 275 , 150)];
movieController.view.backgroundColor = [UIColor grayColor];
[detailview addSubview:movieController.view];
[movieController prepareToPlay];
movieController.shouldAutoplay = NO;
和 willEnterFullscreen() 函数:
- (void)willEnterFullscreen:(NSNotification*)notification {
NSLog(@"willEnterFullscreen");
donepress = YES;
// nothing
}
我尝试了搜索,但仍然没有任何好的答案。请帮我。非常感谢