简体   繁体   English

UICollectionView:拖放式瀑布布局

[英]UICollectionView: Waterfall layout with Drag & Drop

I am using CHTCollectionViewWaterfallLayout as the layout for my collectionView, since my cells do all have different sizes. 我正在使用CHTCollectionViewWaterfallLayout作为collectionView的布局,因为我的单元格的确具有不同的大小。 But I would also like to implement drag & drop in my collectionView. 但我也想在我的collectionView中实现拖放。 The libraries I have found would not allow me to implement both at the same time. 我发现的库不允许我同时实现两者。 Is there any way to do this? 有什么办法吗?

Thanks 谢谢

I found a way to do it, I used one of the existing Drag 'n Drop libraries and made sure it inherited from the CHTCollectionView instead of the UICollectionViewFlowLayout, this worked pretty good! 我找到了一种方法,我使用了现有的Drag'n Drop库之一,并确保它继承自CHTCollectionView而不是UICollectionViewFlowLayout,这很好用! Still some errors to work out, but the beginning is there 仍有一些错误需要解决,但是开始就在那里

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

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