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 could override the setSelected: as so:
- (void)setSelected:(BOOL)selected {
[super setSelected:selected];
if (selected) {
[self animateSelection];
} else {
[self animateDeselection];
}
}
I have found that on repeated touches this method is called on a cell even if it's already selected so you may want to just check that you are really changing state before firing unwanted animations.