I have a custom UICollectionViewCell subclass that overwrites initWithFrame:
and layoutSubviews
to setup its views. However, I\'m now trying to do two
In your custom UICollectionViewCell
subclass, you can implement didSet
on the isSelected
property.
Swift 3:
override var isSelected: Bool {
didSet {
if isSelected {
// animate selection
} else {
// animate deselection
}
}
}
Swift 2:
override var selected: Bool {
didSet {
if self.selected {
// animate selection
} else {
// animate deselection
}
}
}