Last active
September 12, 2019 19:19
-
-
Save thiagobutignon/3691ee161bdf1ebd90ac27b761f5336f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Entra quando a célula é clicada | |
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | |
if let cell = collectionView.cellForItem(at: indexPath) as? CB3DSelectCell { | |
cell.select(animated: true) | |
// if cell.isSelected { | |
// cell.select(animated: false) | |
// if indexPath.row == 0 { | |
// self.dataprovider?.routeToSignUPMerchantPerson() | |
// } else { | |
// self.dataprovider?.routeToSignUPMerchant() | |
// } | |
// } else { | |
// cell.deselect(animated: false) | |
// | |
// } | |
} | |
} | |
// Não entra quando a célula selecionada é clicada. Entra apenas quando outra célula é selecionada. | |
func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) { | |
if let cell = collectionView.cellForItem(at: indexPath) as? CB3DSelectCell { | |
cell.deselect(animated: true) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment