[英]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.