У меня есть следующий код для отображения UIViewController в горизонтальной ориентации поверх UITableViewController.
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) {
[self.view addSubview:landscapeChartViewController.view];
}
if (toInterfaceOrientation == UIInterfaceOrientationPortrait ||
toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
if(landscapeChartViewController != nil)
[landscapeChartViewController.view removeFromSuperview];
}
}
Когда телефон вращается, изображение не занимает весь экран.
Пользователь также может прокручивать, показывая остальную часть UITableViewController. Я не хочу, чтобы UITableViewController был там в горизонтальной ориентации.