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