简体   繁体   English

在Swift中重新排序UICollectionView单元格

[英]Reordering UICollectionView cells in Swift

I need to implement a reordering functionality in UICollectionView , like reordering cells in UITableView . 我需要在UICollectionView实现重新排序功能,例如在UITableView单元格进行重新排序。 Looking for a Swift implementation. 寻找一个Swift实现。

In reordering state of the collectionView , one cell should be able to drag and drop to an other position, and then a delegate would be called to modify datasource accordingly. collectionView重新排序状态下,一个单元格应该能够拖放到另一位置,然后将调用一个委托来相应地修改数据源。

Do you know any solution? 你知道什么解决方案吗?

GitHub上的自定义collectionView布局LXReorderableCollectionViewFlowLayout确实支持您想要的东西,但是它是用Objective-C编写的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM