I'm creating a grouped UICollectionView, and it seems that the top has 35 pixels of extra padding at the top I don't know how to get rid of.
It appears this is also a problem with UITableView and I've found some questions to address it here and here, but those solutions don't work for UICollectionView.
Here's how I initialize my UICollectionView:
var listConfig = UICollectionLayoutListConfiguration(appearance: .grouped)
UICollectionView(frame: .zero, collectionViewLayout: UICollectionViewCompositionalLayout.list(using: listConfig))
// More autolayout constraints code later
So far to fix this I've been applying a -35 constant to the topAnchor, but that doesn't work in all cases (when I want something directly above in the same view).
I also tried listConfig.headerTopPadding = 0 with no success.
How can I get rid of this extra top padding? (And side question...why does that exist?)