デバイスの向きに問題があります。いくつかのビューを持つ iPhone アプリがありますが、1 つを除いてすべてを回転させるべきではありません。だから私は中を見てみますInfo.plist
。縦向きと横向きの 2 つのデバイスの向きを選択します。ビューでは回転させたくないので、これを配置します。
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return NO;
}
しかし、すべてのビューが回転します。これらの行があっても。Info.plist
ポートレートなしをサポートするように変更した場合。それは問題なく動作します。回転させたいビューだけです。
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
そして、それは機能しません。私はiOS 6を使用しています。また試しました
- (NSUInteger)supportedInterfaceOrientations
- (BOOL)shouldAutorotate