Left padding the first item in a UICollectionView using a UICollectionViewFlowLayout

I use UICollectionViewc UICollectionViewFlowLayoutto try to get the left padding / marker on the first item in the view only. I looked through all the attributes and instance methods for each and cannot find what helps.

To be clear, I still want the view to scroll across the entire width of the application, so just moving the surrounding frame will not help.

+4
source share
1 answer

To do what I needed, I needed to set headerReferenceSizeto a UICollectionViewFlowLayoutwidth of 10 pixels.

+8

All Articles