Duplicated Cell Animation During Batch Update

老子叫甜甜 提交于 2020-01-07 03:40:15

问题


I have set up a collectionView to have custom reordering behavior via the solution here

However, when a cell is quickly dragged to a new row, the animation shows the dragged cell animate from its original position again (see below):

I am wondering how I could have it just drop the dragged cell at the row it's been dragged to, rather than showing it animate from its original cell again.


回答1:


I have solved this well by increasing the setting the dragged cell's layer.speed property when the interactive movement begins, and then setting it back to 1 when the batchUpdates are completed.



来源:https://stackoverflow.com/questions/39217683/duplicated-cell-animation-during-batch-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!