Mischa
Mischa

Reputation: 17269

How to use a custom animation curve when applying a snapshot to a UICollectionView data source?

When applying a snapshot to an UICollectionViewDiffableDataSource, the changes are animated when I pass true to the animatingDifferences parameter:

dataSource.apply(snapshot, animatingDifferences: true)

However, the apply method doesn't seem to have a parameter to tweak the animation curve, so the changes are always animated using the default .easeInOut curve, it seems.

Is there any way to change the animation curve to something like .smooth or .spring?

Upvotes: -1

Views: 15

Answers (0)

Related Questions