LXReorderableCollectionViewFlowLayout
LXReorderableCollectionViewFlowLayout copied to clipboard
Why not move instead of insert/delete?
Any reason for not using moveItemAtIndexPath:toIndexPath:
instead of insert/delete here?
Move appears to be a little bit more efficient. Also, it would make the block unnecessary.
There are already some animation issues that I haven't been able to fix. The reason, I suspect, is that delete and insert is just a shorter animation. With a batch, it's basically the same thing.
If there's a reason, please consider adding a comment. If not it looks arbitrary, and prone to accidental changes.
I couldn't remember why but from my test it seems to shows that using insert/delete provides a more consistent effect. If I'm not guessing wrongly its something related to #17. I'll remember to put a comment when I get to that issue. :)
That's a new issue. With the insert/delete or move, the issue is still the same. On my fork I have an experimental patch that either forces a layout change, or does a pre-batch update with nil. Both cancel the animation. Even with that, it doesn't completely fix it as there are other issues.
The insert/delete animation just causes one card to fade out and another to fade in. The move animation actually moves the card, which isn't desirable because you're actually holding the card.
Oh yeah @lukescott's explanation does ring some bells. I saw your experiment branch the other day. When I'm at this issue I will definitely pull down and see if I can get any progression on it, although it might take some time though.