如何制作动态collectionview单元格?

时间:2019-01-09 11:56:02

标签: ios swift

我有这种看法
enter image description here

如果我按下按钮,请添加更多具有信息的单元格,但是由于collectionview受限制而没有显示。
我对collectionview的约束:
enter image description here
我对stackview的限制:
enter image description here
我的结果:
enter image description here

如何制作动态collectionview单元格?

1 个答案:

答案 0 :(得分:0)

如果要在集合视图中显示动态单元格,为什么要添加静态单元格和约束?您只能使用一个单元格,并根据每个索引的要求更改内容。 如果要在底部添加按钮,则可以使用集合视图的页脚视图进行添加。