DailyFeed icon indicating copy to clipboard operation
DailyFeed copied to clipboard

Animate the cell by scaling it, just before it appears on screen

Open vishalkevin11 opened this issue 4 years ago • 2 comments

Feature : Animate the cell by scaling it, just before it appears on screen

Feature Affected Areas :

  • Dailyfeeds List
  • Bookmarks List

Visual View of Feature :

cell_animation

vishalkevin11 avatar Oct 09 '20 03:10 vishalkevin11

This is quite an interesting change, but I would prefer not to merge this, as the animation is a little jarring and not fluid.

paulsumit1993 avatar Oct 11 '20 07:10 paulsumit1993

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
            })
        }
    }

paulsumit1993 avatar Oct 11 '20 07:10 paulsumit1993