gpt4 book ai didi

ios - 使用自动布局居中 UIButton 和 UILabel

转载 作者:行者123 更新时间:2023-11-29 12:05:38 24 4
gpt4 key购买 nike

我是 UIConstraints 的新手,我正尝试使用 Auto Layout 将“Continue Button”和“No, thanks”居中UICollectionViewxib 底部之间的空间。我应该添加哪个 UIConstraints

enter image description here

最佳答案

这是我做的实现

enter image description here

正如您在图片中看到的,我使用不同的组件实现了 3 个堆栈 View 。为了使它们全部成为“一个”,我将它们放在一个 Stack 中,并在底部和顶部设置了 <= 约束,并设置了固定大小的约束,这样它们就不会越过 View 的边界。

关于ios - 使用自动布局居中 UIButton 和 UILabel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35135432/

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