Hi,
I tried to strech the cell and give constraints to each and every label to occupy the full width still the cell does not occupy the full width any idea how to fix this
Thanks
I added this to the collectionviewcell
override func preferredLayoutAttributesFitting(_ layoutAttributes: UICollectionViewLayoutAttributes) -> UICollectionViewLayoutAttributes {
setNeedsLayout()
layoutIfNeeded()
let size = contentView.systemLayoutSizeFitting(layoutAttributes.size)
var frame = layoutAttributes.frame
frame.size.height = ceil(size.height)
layoutAttributes.frame = frame
return layoutAttributes
}
The Cell is fitting perfectly now 😎