-1

This is my code for the UICollectionViewCompositionalLayout.

What I want to achieve is the collection view cell should automatically resize based on the content in the cell. Once I refresh the collection view, I'm getting the issue as shown in the video.

https://drive.google.com/file/d/1jVaFWT6cV8FzBqOF_1HRxzXUBYpPYyTh/view?usp=share_link

I have tried on using these several solutions but still no hope.

https://developer.apple.com/forums/thread/663938 UICollectionViewCompositionalLayout horizontal, not calculating width of content when using estimated and not horizontally hugging UICollectionView Compositional Layout - items size not updated properly on iPad rotation UICollectionViewCell content wrong size on first load

1 Answers1

0

For building a tag list, I used this small lib: AlignedCollectionViewFlowLayout

You can open the repository on GitHub, copy the source file only, and use it in your project for easier customizing.

Neklas
  • 504
  • 1
  • 9