liangdahong / Bmlongpressdragcellcollectionview
Licence: mit
🎉 🎉 🎉 🎉 🎉 让你轻松实现类似支付宝的拖拽重排功能, 支持各种自定义操作。
Stars: ✭ 1,090
Labels
Projects that are alternatives of or similar to Bmlongpressdragcellcollectionview
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Stars: ✭ 3,395 (+211.47%)
Mutual labels: drag, uicollectionview
KDRearrangeableCollectionViewFlowLayout
A Drag and Rearrange UICollectionView through its layout
Stars: ✭ 73 (-93.3%)
Mutual labels: uicollectionview, drag
Bmdragcellcollectionview Swift
🎉 iOS UICollectionView UICollectionViewCell long press to drag the reorder framework Swift Version
Stars: ✭ 212 (-80.55%)
Mutual labels: drag, uicollectionview
Kddraganddropcollectionview
This component allows for the transfer of data items between collection views through drag and drop
Stars: ✭ 476 (-56.33%)
Mutual labels: drag, uicollectionview
Vue Drag Resize
Vue Component for resize and drag elements
Stars: ✭ 1,007 (-7.61%)
Mutual labels: drag
React Prismazoom
A pan and zoom component for React, using CSS transformations.
Stars: ✭ 29 (-97.34%)
Mutual labels: drag
Blueprints
🌀 Blueprints - A framework that is meant to make your life easier when working with collection view flow layouts.
Stars: ✭ 874 (-19.82%)
Mutual labels: uicollectionview
Pagingkit
PagingKit provides customizable menu UI. It has more flexible layout and design than the other libraries.
Stars: ✭ 1,030 (-5.5%)
Mutual labels: uicollectionview
Ssplaceholdertableview
SSPlaceholderTableView is Placeholder Library for different different state wise placeHolder for UITableView/UICollectionView. Check https://www.cocoacontrols.com/controls/ssplaceholdertableview
Stars: ✭ 39 (-96.42%)
Mutual labels: uicollectionview
Gridstrap.js
gridstrap.js is a jQuery plugin designed to take Bootstrap's CSS grid system and turn it into a managed draggable and resizeable grid while truely maintaining its responsive behaviour.
Stars: ✭ 32 (-97.06%)
Mutual labels: drag
Vue Slicksort
A set of vue mixins to turn any list into an animated, touch-friendly, sortable list ✌️
Stars: ✭ 1,010 (-7.34%)
Mutual labels: drag
Collectionviewpaginglayout
a simple but highly customizable paging layout for UICollectionView.
Stars: ✭ 947 (-13.12%)
Mutual labels: uicollectionview
Carbon
🚴 A declarative library for building component-based user interfaces in UITableView and UICollectionView.
Stars: ✭ 1,034 (-5.14%)
Mutual labels: uicollectionview
Ascollectionview
A SwiftUI collection view with support for custom layouts, preloading, and more.
Stars: ✭ 878 (-19.45%)
Mutual labels: uicollectionview
Uiutil
UIUtil for Android, Lyrics, Tick animations, Comparisons, Satellite menus, Praise, Slide buttons, TAB indicators, Contact sorting, Drag sorting, Skidding deletes, Shadow effects, RecyclerView nesting RecyclerView, Map list Poi/Drawer effects, Progress settings, Clock set, Damping, Progress, Album, Snap, Progress, CircleDownload, AdvertSwitcher, Carousel ad, FlowLayout, Tag...; 歌词控件、打勾动画、对比、卫星菜单、点赞、滑动按钮、TAB指示器、联系人排序、拖曳排序、侧滑删除、阴影效果.、RecyclerView嵌套RecyclerView.、地图列表Poi/抽屉效果、进度设置、时钟设置、滑动阻尼、相册媒体快照、圆形下载进度,轮播广告, 流式布局,标签...
Stars: ✭ 1,018 (-6.61%)
Mutual labels: drag
Tangramkit
TangramKit is a powerful iOS UI framework implemented by Swift. It integrates the functions with Android layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,LayoutSizeClass to build your App 自动布局 UIView UITableView UICollectionView
Stars: ✭ 984 (-9.72%)
Mutual labels: uicollectionview
介绍
- 本框架是一个让你轻松实现类似支付宝的拖拽重排功能,支持自定义,
iOS8+
,具体可查看代码。
CocoaPods 安装
pod 'BMLongPressDragCellCollectionView'
pod install
#import "BMLongPressDragCellCollectionView.h"
手动安装
- 下载项目 「
clone https://github.com/liangdahong/BMLongPressDragCellCollectionView.git
」 - 将
BMLongPressDragCellCollectionView
文件夹下的全部内容拖拽到你的项目。
使用说明
-
BMLongPressDragCellCollectionView
是继自UICollectionView
,其使用方式和UICollectionView
一致,只需要把UICollectionView
修改为BMLongPressDragCellCollectionView
即可【支持 Xib,StoryBoard】。 - 原来的
UICollectionViewDataSource
换为 BMLongPressDragCellCollectionViewDataSource
- 原来的
UICollectionViewDelegateFlowLayout
换为BMLongPressDragCellCollectionViewDelegate
。 - 实现数据源方法,内部会使用此方法获取数据源,必须实现,之所以设计为
NSArray< NSArray<id> *> *
的数据结构是因为内部要对cell
【数据源】做排序处理。
- (NSArray< NSArray<id> *> *)dataSourceWithDragCellCollectionView:(__kindof BMLongPressDragCellCollectionView *)dragCellCollectionView;
如下:
- (NSArray<NSArray<id> *> *)dataSourceWithDragCellCollectionView:(__kindof BMLongPressDragCellCollectionView *)dragCellCollectionView {
return self.dataSourceArray;
}
- 实现代理方法,当 Cell 有交换时调用,需要外面保存最新的数据源【如果有交换时,数据源已经更新】,必须实现。
- (void)dragCellCollectionView:(BMLongPressDragCellCollectionView *)dragCellCollectionView newDataArrayAfterMove:(nullable NSArray< NSArray<id> *> *)newDataArray;
如下:
- (void)dragCellCollectionView:(BMLongPressDragCellCollectionView *)dragCellCollectionView newDataArrayAfterMove:(nullable NSArray< NSArray<id> *> *)newDataArray {
self.dataSourceArray = [newDataArray mutableCopy];
}
图文演示
Xib
或者 StoryBoard
中使用
在
- 在
Xib
或者StoryBoard
中只需要上面的3 步
就可以让你的UICollectionView
完美支持拖拽重排了。
使用纯代码实现
- 在纯代码实现中只需要上面的
3 步
就可以让你的UICollectionView
完美支持拖拽重排了。
更多自定义方案
如果要做一些自定义的操作可以通过设置 BMLongPressDragCellCollectionView
的相关属性或者实现一些特定的协议方法来处理,可查看 BMLongPressDragCellCollectionView
的头文件和 BMLongPressDragCellCollectionViewDelegate
与 BMLongPressDragCellCollectionViewDataSource
协议。
联系
其他
- 定个小目标 😂 2020年08月05日 纯 Swift 正在计划中...
感谢
- 核心实现参考自XWDragCellCollectionView 特别感谢。
相关推荐
- 🖖高性能的自动计算采用 Autolayout 布局的 UITableViewCell 和 UITableViewHeaderFooterView 的高度,内部自动管理高度缓存。 https://github.com/liangdahong/UITableViewDynamicLayoutCacheHeight
License
BMLongPressDragCellCollectionView is released under the MIT license. See LICENSE for details.
广告时间 😁,下面是我开发的几款小程序,感兴趣的可以看看,点点广告就更好了,哈哈哈~~~
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].