У меня работает 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;
}
Как заставить его перейти в портретный режим после нажатия кнопки "Готово"?