The default cell height is 44pt in iOS 18 and 52pt in iOS 26. I'm trying to reduce the height back to 44pt in one screen that needs to fit as much content on screen as possible. How do you do that when using UIListContentConfiguration?
I expected this would do the trick but alas it doesn't reduce the cell height.
let cellRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, Item> { cell, indexPath, item in
cell.contentConfiguration = {
var config = UIListContentConfiguration.valueCell()
config.text = "Title"
config.secondaryText = "Value"
// This only removes horizontal margins, does not change vertical margins
config.axesPreservingSuperviewLayoutMargins = []
config.directionalLayoutMargins = .zero
return config
}()
}