Created
November 15, 2019 05:35
-
-
Save mcz9mm/b050844a39ddf3cf780ed71e2d0cb3ba to your computer and use it in GitHub Desktop.
CollectionViewCellHighlight
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 FooCollectionViewCell: UICollectionViewCell { | |
override var highlighted: Bool { | |
didSet { | |
self.contentView.backgroundColor = highlighted ? #colorLiteral(red: 0, green: 0, blue: 0, alpha: 0.1) : #colorLiteral(red: 0, green: 0, blue: 0, alpha: 0.0) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment