gpt4 book ai didi

ios - "Add New Constraints"为什么左边和右边是-16,而不是0?

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:59:26 26 4
gpt4 key购买 nike

自从 Xcode 6iOS8 的引入以来,我注意到当我去固定一个 UIView 类型来填充复选框时左边和右边总是-16,为什么不是0。因为我想要零间距。我只是想知道 -16 从哪里来?

enter image description here

最佳答案

Apple 建议在 UIView 内部留出 16pt 的边距。 Apple 放这个是为了防止标签、图像等出现在屏幕的边缘。如果你想,但在边缘你有两种方法

1-。将约束添加到 -16 通常它们有效,但有时无效

2-。取消选中 margin 约束,你将有 0

这只发生在主 UIView 上

如果你想在两个边缘上查看,我建议始终取消选中“constraint to margin”

关于ios - "Add New Constraints"为什么左边和右边是-16,而不是0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31055701/

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