In my app I have a switch and I want it to be an indicator for saving images. For now I have just a button that saves all the images.
It just makes more sense with an example
What I've tried:
func saveTapped() {
let cell = collectionView?.cellForItem(at: indexPath) as! CustomCell
for image in images where cell.savingSwitch.isOn {
...
But I can't access indexPath. How should I call this Save method in order to access a particular row in my collectionView? Or is there another way?