         guard let cell = collectionView.cellForItem(at: indexPath) as? PhotoCell else { return false }
         
         let item = self.items[indexPath.row]
-        if let index = self.selections.index(of: item) {
+        if let index = self.selections.index(of: item) { // DeSelect
             // Deselect asset
             self.selections.remove(at: index)
             

        cell.accessibilityIdentifier = "photo_cell_\(indexPath.item)"
        cell.settings = settings
        let item = self.items[indexPath.row]
        cell.imageView.image = rowHandler(item)
        
        // Set selection number

            cell.photoSelected = true
        }
        
        if let changeSelectionsHandler = self.changeSelections {
            changeSelectionsHandler(self.selections)
        }
        
        return false
    }
    
    public func registerCellIdentifiersForCollectionView(_ collectionView: UICollectionView?) {
        collectionView?.register(UINib(nibName: "PhotoCell", bundle: self.bundle), forCellWithReuseIdentifier: photoCellIdentifier)
    }
    
    
}

// MARK: CustomPhotoDataSource proxy
extension CustomPhotoDataSource: BSImagePickerSettings {
    
    public var maxNumberOfSelections: Int {
        get {
            return settings.maxNumberOfSelections
        }
        set {
            settings.maxNumberOfSelections = newValue
        }
    }
    
    public var selectionCharacter: Character? {
        get {
            return settings.selectionCharacter
        }
        set {
            settings.selectionCharacter = newValue
        }
    }
    
    public var selectionFillColor: UIColor {
        get {
            return settings.selectionFillColor
        }
        set {
            settings.selectionFillColor = newValue
        }
    }
    
    public var selectionStrokeColor: UIColor {
        get {
            return settings.selectionStrokeColor
        }
        set {
            settings.selectionStrokeColor = newValue
        }
    }
    
    public var selectionShadowColor: UIColor {
        get {
            return settings.selectionShadowColor
        }
        set {
            settings.selectionShadowColor = newValue
        }
    }
    
    public var selectionTextAttributes: [String: AnyObject] {
        get {
            return settings.selectionTextAttributes
        }
        set {
            settings.selectionTextAttributes = newValue
        }
    }
    
    public var backgroundColor: UIColor {
        get {
            return settings.backgroundColor
        }
        set {
            settings.backgroundColor = newValue
        }
    }
    
    public var cellsPerRow: (_ verticalSize: UIUserInterfaceSizeClass, _ horizontalSize: UIUserInterfaceSizeClass) -> Int {
        get {
            return settings.cellsPerRow
        }
        set {
            settings.cellsPerRow = newValue
        }
    }
    
    public var takePhotos: Bool {
        get {
            return settings.takePhotos
        }
        set {
            settings.takePhotos = newValue
        }
    }
    
    public var takePhotoIcon: UIImage? {
        get {
            return settings.takePhotoIcon
        }
        set {
            settings.takePhotoIcon = newValue
        }
    }
    
}

