Iphone 将纵向旋转到“我的视图”控制器的横向和纵向模式
通常,我的应用程序以纵向模式显示除报表视图以外的所有视图。仅当我在“设置”视图上并将设备旋转到横向模式时,报告视图才会显示。现在,当我再次将设备旋转到纵向模式时,报告视图将被取消,设置视图将显示Iphone 将纵向旋转到“我的视图”控制器的横向和纵向模式,iphone,xcode,interface-orientation,Iphone,Xcode,Interface Orientation,通常,我的应用程序以纵向模式显示除报表视图以外的所有视图。仅当我在“设置”视图上并将设备旋转到横向模式时,报告视图才会显示。现在,当我再次将设备旋转到纵向模式时,报告视图将被取消,设置视图将显示 In report view > shouldAutorotateToInterfaceOrientation return ((interfaceOrientation == UIInterfaceOrientationLandscapeRight)||( interfaceOrienta
In report view
> shouldAutorotateToInterfaceOrientation
return ((interfaceOrientation == UIInterfaceOrientationLandscapeRight)||( interfaceOrientation == UIInterfaceOrientationLandscapeLeft));
Here at settings view
shouldAutorotateToInterfaceOrientation
if((interfaceOrientation == UIInterfaceOrientationLandscapeRight)||( interfaceOrientation == UIInterfaceOrientationLandscapeLeft))
{
Report *report = [[Report alloc]initWithNibName:@"Report" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:report animated:YES];
[report release];
}
return YES;
}
不要在shouldRotate…(应旋转…)中创建viewcontroller,而是在
willRotateToInterfaceOrientation:duration:
中创建viewcontroller,您应该在该位置响应旋转。在您的shouldAutorotateToInterfaceOrientation:
中,当您希望能够旋转到该方向时,只需返回YES即可-在您的情况下,看起来您希望旋转到所有方向,或者旋转到除肖像外的所有方向
在您的
willRotateToInterfaceOrientation:duration:
中,您可以根据需要推送或弹出viewcontroller。不要在shouldRotate…(应旋转…)中创建viewcontroller,而是在willRotateToInterfaceOrientation:duration:
中创建viewcontroller,这是您应该响应旋转的位置。在您的shouldAutorotateToInterfaceOrientation:
中,当您希望能够旋转到该方向时,只需返回YES即可-在您的情况下,看起来您希望旋转到所有方向,或者旋转到除肖像外的所有方向
在您的
willRotateToInterfaceOrientation:duration:
中,您可以根据需要推送或弹出viewcontroller。您面临的确切问题是什么?您是否能够在横向模式下查看报表视图?如果是的话,请解释下一步你需要做什么。只有我很好地理解你的问题,我才能帮助你。但是你不能用地道的英语向我解释。我试图修改你的问题,在某种程度上,我理解了你的问题。请再次阅读修改后的问题,并让我知道我是否正确解释了问题?您面临的确切问题是什么?您是否能够在横向模式下查看报表视图?如果是的话,请解释下一步你需要做什么。只有我很好地理解你的问题,我才能帮助你。但是你不能用地道的英语向我解释。我试图修改你的问题,在某种程度上,我理解了你的问题。请再次阅读修改后的问题,并让我知道我是否解释正确?