iOS用のプロジェクトにXcode4.4を使用していて、画面の1つを永続的に横向きにしたかったので、
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
Xcode4.5とiOS6.0にアップデートしてからはまったく機能しなかったので、新しい機能を使用する必要があることがわかりました。
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscapeRight;
}
- (BOOL)shouldAutorotate {
return YES;
}
これで画面は横向きになりましたが、画面が縦向きモードのままであるように、ステータスバーはその場所に残ります。
修正方法がわかりません。
ありがとうございました。