I have a UICollectionView
, and when selecting an item didDeselectItemAt
not get triggered, but when selecting an other item, the first will get triggered. Why?
This is have method is implemented:
override func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {
let userSetting = userSettings[(indexPath as NSIndexPath).row]
selectedUserSettingRecordName = userSetting.id
containerViewController!.performSegue(withIdentifier: "message", sender:self)
}
There is no view above the collectionView
which could interfere.
is not
didDeselectItemAt - is called in second time, if you select the any item after that it will call
override func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {
it is
didSelectItemAt - is called in first time, if you select the any item it will call
override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With