简体   繁体   中英

How to manage the orientations a Uno App supports on at least iOS?

Normally, the orientations that an iOS supports are either defined by the app's Info.plist file. or the application delegate's supportedInterfaceOrientations . However, this doesn't seem to work in that way with Uno. How should this be done instead?

Since the implementation of the DisplayInformation class in Uno, the application references its AutoRotationPreferences property by default, instead of referencing the Info.plist configuration.

To exclude or include a orientation from the AutoRotation behaviour you can set this in code:

using Windows.Graphics.Display;
...
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;

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