简体   繁体   English

适用于IOS的Xamarin Forms使用本机解析

[英]Xamarin Forms for IOS use native resolution

I have created my first Xamarin Forms App targetting UWP and IOS. 我已经创建了第一个针对UWP和IOS的Xamarin Forms App。

The UI was originally designed for UWP to target a 1920x1080 screen and when IOS on an iPad was added we identified that the ones we are interested in have a minimum of 2048x1536 screens, so the same design should fit onto the iPad quite comfortably. 该UI最初是为UWP设计的,以1920x1080屏幕为目标,当在iPad上添加IOS时,我们确定我们感兴趣的UI至少具有2048x1536屏幕,因此相同的设计非常舒适地适合iPad。

Unfortunately, when the app is deployed to a brand new iPad and even iPad Pro then the UI shows effectively 1024x768. 不幸的是,当应用程序部署到全新的iPad甚至iPad Pro上时,UI会有效显示1024x768。

The UI does allow for low resolutions but we don't want to be restricted to such a ridiculous resolution as 1024x768 when we have 2048x1536 available on the iPad and 2732x2048 available on the iPad Pro UI确实允许低分辨率,但是当我们在iPad上有2048x1536和iPad Pro上有2732x2048时,我们不希望限于1024x768这样的可笑分辨率

So the app is scaling to 2x or 3x, (which is terrible on the iPad Pro). 因此,该应用程序可扩展至2倍或3倍(在iPad Pro上非常糟糕)。

I have seen many suggestions to use a LaunchScreen.xib to tell iOS that the app is allowed a resolution but when I try to research this I find that it is deprecated. 我已经看到许多建议,可以使用LaunchScreen.xib告诉iOS,该应用允许使用分辨率,但是当我尝试对其进行研究时,我发现它已被弃用。 I created a LaunchScreen.storyboard but this has not helped. 我创建了LaunchScreen.storyboard,但这没有帮助。

So my (2-part) question is as follows... 所以我的(两部分)问题如下...

Is there actually a way to convince iOS to use 1x scaling? 实际上是否有办法说服iOS使用1倍缩放?

If so could anyone point me in the direction of some current documentation about how to make it work? 如果是这样,谁能指出我有关如何使其工作的最新文档的方向?

After much investigation and hair pulling it would seen that iOS just "knows" how big its physical pixels are and it won't let you switch off scaling. 经过大量调查和研究,iOS会“知道”其物理像素有多大,并且不会让您关闭缩放比例。

Our next best course of action was to reduce font sizes by 20%, cut back on whitespace and then finally explicitly change what still didn't fit. 我们的下一个最佳做法是将字体大小减少20%,减少空白,然后最后明确更改仍然不适合的内容。

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

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