批量更新期间重复的单元格动画 [英] Duplicated Cell Animation During Batch Update

查看:23
本文介绍了批量更新期间重复的单元格动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了一个 collectionView 以具有自定义重新排序行为

我想知道如何让它只是将拖动的单元格放在它被拖动到的行上,而不是再次从原始单元格显示动画.

解决方案

我已经很好地解决了这个问题完成.

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.

解决方案

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.

这篇关于批量更新期间重复的单元格动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆