CellSizeToFitLabel
CellSizeToFitLabel copied to clipboard
Add cells at run time it occurs issues.
When Add new rows in collectionview, It not reload all cells. if let flowLayout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout { flowLayout.estimatedItemSize = CGSize(width: 1, height: 1) //use auto layout for the collection view } - this line cause the issue.
Please confirm the issue and give a solution of this. Thank you.
Have you tried using invalidateLayout? Maybe your data have changed so then you need to indicate that the layout attributes need to be changed as well. This will recalculate the correct sizes for your cells.