Код: Выделить всё
let cellRegistration = UICollectionView.CellRegistration { 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
}()
}
let layout = UICollectionViewCompositionalLayout { sectionIndex, environment in
let config = UICollectionLayoutListConfiguration(appearance: .insetGrouped)
return NSCollectionLayoutSection.list(using: config, layoutEnvironment: environment)
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... onfigurati
Мобильная версия