📌  相关文章
📜  取消选择集合视图中的所有单元格 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:00.099000             🧑  作者: Mango

代码示例1
extension UICollectionView {

    func deselectAllItems(animated: Bool) {
        guard let selectedItems = indexPathsForSelectedItems else { return }
        for indexPath in selectedItems { deselectItem(at: indexPath, animated: animated) }
    }
}