简体   繁体   English

尽管有info.plist属性,Xamarin IOS项目仍允许旋转

[英]Xamarin IOS project allows rotation despite info.plist property

I'm trying to disable auto-rotate from my Xamarin.IOS project for IPhone/IPad. 我正在尝试从Xamarin.IOS项目为iPhone / iPad禁用自动旋转。 First off, I only have Portrait enabled in my info.plist. 首先,我仅在info.plist中启用了Portrait。 The screen still rotates so I included all of the code from this previously answered question to every UIViewController involved and AppDelegate.cs (Except for the boolean property and conditional statement) as described in the solution. 屏幕仍然旋转,因此我将所有先前解决的问题中的所有代码都包括到解决方案中所述的每个UIViewController以及AppDelegate.cs(布尔属性和条件语句除外)中。 Regardless, when I run the app on the IPad I've been using to design it, the screen rotates to any orientation. 无论如何,当我在用于设计的iPad上运行该应用程序时,屏幕都会旋转到任何方向。 Any help or insight is appreciated. 任何帮助或见解表示赞赏。

Check device orientation with (iphone/ipad) in info.plist to keep consistent. 使用info.plist中的(iphone / ipad)检查设备方向以保持一致。

Refer to here . 请参考这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xamarin iOS,无法打开Info.plist - Xamarin iOS, Info.plist couldn't be opened 错误:无法从应用程序中提取Info.plist:无法将plist文件“ /Pathof.appfile/Info.plist”解析为XML - Error: Could not extract Info.plist from application: Could not parse plist file '/Pathof.appfile/Info.plist' as XML 有没有办法在 iOS 项目上禁用 xamarin.forms.maps 上的信息窗口? - Is there a way to disable info window on xamarin.forms.maps on iOS project? 您正在使用http下载。 目前,Unity将NSAllowsArbitraryLoads添加到Info.plist以简化转换 - You are using download over http. Currently Unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition Visual Studio 2017 Info.plist在更改选项卡后丢失分发目标 - Visual studio 2017 Info.plist lose Distribution Destination after tab change Xamarin没有构建iOS项目 - Xamarin not building iOS project Xamarin iOS 项目中的 BindableRadioGroup - BindableRadioGroup in Xamarin iOS project 自定义.plist文件未添加到ios项目 - Custom .plist file not added to ios project FirebasePushNotificationManager.Initialize 为 iOS 不使用 GoogleService-Info.plist - FirebasePushNotificationManager.Initialize for iOS without using GoogleService-Info.plist 使用MvvmLight和Xamarin.iOS将属性绑定到ViewModel - Binding a property to a ViewModel with MvvmLight and Xamarin.iOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM