简体   繁体   中英

How can I force landscape for all views in Xcode

I tried to set the device orientation to landscape only (left & right) in the General tab of the target and also in the Info tab for iPad and iPhone, but portrait mode is still supported/enabled. Is this a Xcode bug or does anyone know why portrait mode is still supported even though I disabled it in both places? Preferably I would like to achieve it without setting it in code. I am using Xcode 13.

After playing around for a while I saw, that the portrait mode is still set in the Build Settings tab even though I disabled it in the General and Info tab. Just click on your Target -> Build Settings -> search for 'Orientation' and remove the portrait one if there is any.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM