简体   繁体   English

如何适应不同的屏幕尺寸

[英]How to fit different screen size

My app looks good on iphone, elements cover all screen but in ipad they cover only half of the screen.我的应用程序在 iphone 上看起来不错,元素覆盖了整个屏幕,但在 ipad 中它们只覆盖了一半的屏幕。 How can I fit size depending on size devices?如何根据尺寸设备调整尺寸?

As mentioned above you can add different constraints depending on the device size.如上所述,您可以根据设备大小添加不同的约束。 However a well defined layout should work well across all screens.然而,定义明确的布局应该在所有屏幕上都能很好地工作。

Apple documentation is always a great place to start: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/WorkingwithConstraintsinInterfaceBuidler.html#//apple_ref/doc/uid/TP40010853-CH10-SW1 Apple 文档始终是一个很好的起点: https : //developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/WorkingwithConstraintsinInterfaceBuidler.html#//apple_ref/doc/uid/TP40010853-CH10-SW1

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

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