gpt4 book ai didi

swift - UICollectionViewCell 内部填充(Swift)

转载 作者:可可西里 更新时间:2023-11-01 01:32:37 24 4
gpt4 key购买 nike

所有答案均引用 UICollectionView 填充。我的问题是关于 UICollectionViewCell 填充的。我希望能够在单元格内设置一定的填充,以便单元格的内容不会触及单元格的边缘。有这样的属性吗?

最佳答案

想法

因此,在那个特定的 UICollectionViewCell 中,我会有一个简单的 View ,它充当每个其他 subview 的容器。然后将前导、尾随、顶部和底部约束连接到导出,以便稍后在代码中操作它们的常量。

方法

enter image description here enter image description here

结果

enter image description here

关于swift - UICollectionViewCell 内部填充(Swift),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39056235/

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