[英]How to manage the orientations a Uno App supports on at least iOS?
通常,iOS 支持的方向由應用程序的 Info.plist 文件定義。 或應用程序委托的supportedInterfaceOrientations
。 但是,這似乎不適用於 Uno。 應該怎么做呢?
由於在Uno中實現了DisplayInformation
class,應用程序默認引用其AutoRotationPreferences
屬性,而不是引用Info.plist配置。
要從 AutoRotation 行為中排除或包含方向,您可以在代碼中進行設置:
using Windows.Graphics.Display;
...
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.