DailyFeed
DailyFeed copied to clipboard
Animate the cell by scaling it, just before it appears on screen
Feature : Animate the cell by scaling it, just before it appears on screen
Feature Affected Areas :
- Dailyfeeds List
- Bookmarks List
Visual View of Feature :
This is quite an interesting change, but I would prefer not to merge this, as the animation is a little jarring and not fluid.
How about something subtle like the following?
///Animate the cell by scaling it, just before it appears on screen
func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
if collectionView.isDragging {
cell.transform = .init(scaleX: 0.95, y: 0.95)
UIView.animate(withDuration: 0.5, delay: 0.0, options: [.curveEaseInOut], animations: {
cell.transform = .identity
})
}
}