アプリを実行すると、アプリを縦向きモードに保つことができないようです。サポートされているデバイスの向きを縦向きのみに設定しても、アプリは回転します。すべてのヘルプに感謝します。
1260 次
2 に答える
3
これをすべてのViewControllerに書き込みます
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return NO;
}
また、project-info.plistにあります
キーの値を変更します
<key>UISupportedInterfaceOrientationss</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
に
<key>UISupportedInterfaceOrientationss</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
于 2012-06-03T19:52:14.753 に答える
0
これをすべてのビューコントローラに書き込みます。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
于 2012-06-08T06:05:19.817 に答える