Post

Replies

Boosts

Views

Activity

UICollectionViewListCell's multi select accessory not displayed
I try to use a multiselect accessory, here is my cell registration:         let cellRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, Item> { (cell, indexPath, item) in             switch item {             case let .text(text):                 var config = cell.defaultContentConfiguration()                 config.text = text                 cell.contentConfiguration = config             }             cell.accessories = [.multiselect(displayed: .whenEditing)]         } I can't get it working. The multiselect accessory is never displayed. I have added in viewDidLoad: self.navigationItem.rightBarButtonItem = self.editButtonItem collectionView.allowsMultipleSelectionDuringEditing = true
1
0
997
Sep ’20