0
votes

I don't check any device orientation on the Deployment Info page, that is, there is no entry in the Supported interface orientations on the Info.plist. However, the iPhone still can rotate to landscape. How can I disable iPhone rotation? Do I need to write some code in the view controller? Thanks in advance.

2
Don't delete it just say that supported is portrait ... for me it works. also I have a question to you why is iPad tagged here while your question is about iPhone?Roma-MT
"I don't check any device orientation on the Deployment Info page" You should check the portrait only.Roma-MT

2 Answers

2
votes

When you don't check any orientation, it defaults to all of them. To keep the orientation at only portrait, you must check the portrait only orientation.

0
votes

You can toggle here in the device orientation section which orientation that you want your app to support:

portrait mode only

Just set it to portrait and you'll be fine.