xcode UICollectionViewCompositionalLayout关于标题和单元格估计宽度的问题

kzipqqlq  于 2023-05-01  发布在  其他
关注(0)|答案(1)|浏览(75)

这是我的UICollectionViewCompositionalLayout代码。
我想实现的是集合视图单元格应该根据单元格中的内容自动调整大小。一旦我刷新集合视图,我就得到了视频中所示的问题。
https://drive.google.com/file/d/1jVaFWT6cV8FzBqOF_1HRxzXUBYpPYyTh/view?usp=share_link
我试过使用这几种解决方案,但仍然没有希望。
https://developer.apple.com/forums/thread/663938UICollectionViewCompositionalLayout horizontal, not calculating width of content when using estimated and not horizontally huggingUICollectionView Compositional Layout - items size not updated properly on iPad rotationUICollectionViewCell content wrong size on first load

thtygnil

thtygnil1#

为了构建标签列表,我使用了这个小lib:AlignedCollectionViewFlowLayout
您可以在GitHub上打开存储库,仅复制源文件,并在项目中使用它以便于自定义。

相关问题