ポートレートモードでアプリを表示することに成功しました。問題は、横向きで見ると適切ではないようです。このコードを実装しました。
if([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft)
{
return interfaceOrientation=UIInterfaceOrientationLandscapeLeft;
}
else if([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight)
{
return interfaceOrientation=UIInterfaceOrientationLandscapeRight;
}
else if([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait)
{
return interfaceOrientation=UIInterfaceOrientationPortrait;
}
何か特別なことをする必要がありますか?このコードは私に役立ちますか?