我正在使用 iOS 6.0 的 Base SDK 构建一个项目。
在 Targets > Summary 中,我将 Supported Deviceorientations 设置为仅纵向(未选择其他方向)。
当我在 6.0 模拟器中运行应用程序时,这很有效,应用程序按预期锁定为纵向。但是,当我运行 5.1 模拟器时,它支持两个横向(但不倒置)!?
我想在整个应用程序中的每个视图中强制使用肖像(一个视图控制器)。目前在 iOS 5.1 中进行测试时,无论我做什么,它都允许旋转。
尽管在 iOS6 中被贬值,但我一直保留:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
但这无济于事。
我如何也只能在 iOS 5.0 中强制人像?