Last active
November 30, 2020 09:29
-
-
Save eilonkr/ff3b189571c5f824c60fe7d67bda1e82 to your computer and use it in GitHub Desktop.
LibraryViewModel.swift
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
class LibraryViewModel: CollectionViewModel<NoteCell> { | |
init(collectionView: UICollectionView) { | |
super.init(collectionView: collectionView, cellReuseIdentifier: "NoteCell") | |
} | |
} | |
// MARK: - UICollectionViewDelegate Implementation | |
extension LibraryViewModel: UICollectionViewDelegate { | |
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | |
remove([items.value[indexPath.item]]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment