【问题标题】:How to fit different screen size如何适应不同的屏幕尺寸
【发布时间】:2020-01-20 08:43:16
【问题描述】:

我的应用在 iphone 上看起来不错,元素覆盖了整个屏幕,但在 ipad 中它们只覆盖了一半的屏幕。 如何根据尺寸设备调整尺寸?

【问题讨论】:

标签: ios swift ipad


【解决方案1】:

如上所述,您可以根据设备大小添加不同的约束。然而,一个定义良好的布局应该在所有屏幕上都能很好地工作。

Apple 文档总是一个很好的起点:https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/WorkingwithConstraintsinInterfaceBuidler.html#//apple_ref/doc/uid/TP40010853-CH10-SW1

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-09-20
    • 2016-07-22
    • 1970-01-01
    • 2019-07-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多