For UITableViewCell
s and UICollectionViewListCell
s, their contentView.layoutMarginsGuide
respect the colletionView's layoutMarginsGuide automatically, which can be 16 or 20 points horizontally.
This is the expected behavior.
But for regular UICollectionViewCell
s with a regular compositional layout, their contentView.layoutMarginsGuide
are defaulted to 8 points.
I don't see where I can hook into and change the layout margins of the cells . I've looked into contentInset
property and contentInsetReference
property of section
and item
when constructing a compositional layout, but with no luck, their intentions are to change the width of the cells themselves.