Remove list UICollectionView cell separators
You can hide the separator by changing property showsSeparators
of UICollectionLayoutListConfiguration
(you probably pass UICollectionLayoutListConfiguration
to your collectionView.collectionViewLayout
when configuring your collection view layout).
Example usage:
let provider = {(_: Int, layoutEnv: NSCollectionLayoutEnvironment) -> NSCollectionLayoutSection? in
var configuration = UICollectionLayoutListConfiguration(appearance: .grouped)
configuration.showsSeparators = false // <----- hide separators
return .list(using: configuration, layoutEnvironment: layoutEnv)
}
collectionView.collectionViewLayout = UICollectionViewCompositionalLayout(sectionProvider: provider)