Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion IGColorPicker/Classes/View/ColorPickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,17 @@ open class ColorPickerView: UIView, UICollectionViewDelegate, UICollectionViewDa

}


public func deselectSelectedColor(animated: Bool) {
guard let selectedIndex = _indexOfSelectedColor else { return }

let index = IndexPath(item: selectedIndex, section: 0)
_indexOfSelectedColor = nil

guard let colorPickerCell = collectionView.cellForItem(at: index) as? ColorPickerCell else { return }

colorPickerCell.checkbox.setCheckState(.unchecked, animated: animated)
}

// MARK: - UICollectionViewDataSource

public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
Expand Down