gpt4 book ai didi

ios - Xcode Autolayout - 在横向 View 中使 subview 变小

转载 作者:行者123 更新时间:2023-12-01 17:24:54 25 4
gpt4 key购买 nike

我的 Storyboard中有以下 View 。肖像版可以正常工作,没有任何问题。但我想做Profile Image在横向 View 中较小。然后底部项目获得屏幕空间。除了 AutoLayout 之外,我还需要进行编码吗

人像模式

enter image description here

横向模式

enter image description here

Storyboard View

enter image description here

最佳答案

男孩这是要遵循的步骤,

  • 如下图
  • 中向 UIImageView 添加高度、宽度约束

    enter image description here

    enter image description here
  • 您成功添加了高度、宽度约束,现在我们将在横向 View 中为所有 iphone 添加尺寸类。检查图片以了解尺寸等级。

  • enter image description here

    enter image description here

    enter image description here
  • 现在您已完成为高度约束添加尺寸类,对宽度约束执行相同的步骤(这是您的家庭作业)。
  • 检查下面图片中的输出

  • enter image description here

    enter image description here

    关于ios - Xcode Autolayout - 在横向 View 中使 subview 变小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33540009/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com