【发布时间】:2011-09-13 19:45:54
【问题描述】:
我有一个 MPMoviePlayer 工作。它旨在将邮票大小的电影显示为视图中的子视图。当手机旋转到横向时,它会进入全屏模式。当手机处于纵向时,它会进入邮票纵向模式。
唯一的问题是当我在横向模式下按完成时,它会保持横向,与邮票大小的电影,而不是踢回纵向..
这是我的一些代码:
-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight || toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
[moviePlayerController setFullscreen:YES animated:YES];
} else
{
[moviePlayerController setFullscreen:NO animated:YES];
}
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft;
}
按完成后如何让它进入纵向模式?
【问题讨论】:
标签: iphone objective-c ios mpmovieplayercontroller