マイアプリは以下の画像のように、唯一のポートレートモードがあります。 Device OrientationのiOS:特定のランドスケープモード
しかし、それは、カスタマイズのUIViewControllerに風景モードをサポートする必要があります。私はオーバーライドフォロー機能を持っています。
- (BOOL)shouldAutorotate
{
return NO;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeRight;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
それはほとんどの場合で働いていたが、何とかそれはフォローの画像のように行動します: problem picture
をデバイスの向きとMyViewControllerの向きの間で競合しているがあるようです。
PS:私のデバイスはiPhone 6s Plusで、システムはiOS 10.0です。この問題はiPhone 6sにも存在します。
私はあなたにこれを達成するための代替案を提案できますか? – KKRocks
はい、plz、私が知りたい、thx – zxbeef
私の答えをチェックしてください。私のプロジェクトでうまくいきました。 – KKRocks