Is there a possibility to change the background color of UICollectionView
only while the element is tapped. I have tried:
-(void) collectionView:(UICollectionView *)collectionView didHighlightItemAtIndexPath:(NSIndexPath *)indexPath{
//change color when tapped
}
-(void)collectionView:(UICollectionView *)collectionView didUnhighlightItemAtIndexPath:(NSIndexPath *)indexPath{
//change back on touch up
}
But the result is that I can see the change only when i keep my finger for a bit longer time.
Is there some similar stuff like in UITableViewCell
method willSelectItemAtIndexPath:
?
But the result is that I can see the change only when i keep my finger for a bit longer time
The delay your are experiencing is probably related to the "Delay content touches" checkbox in the storyboard.
Try to un-check it.
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