KDDragAndDropCollectionView alternatives and similar libraries
Based on the "Table View / Collection View" category.
Alternatively, view Drag and Drop UICollectionView alternatives based on common mentions on social networks and blogs.
-
IGListKit
A data-driven UICollectionView framework for building fast and flexible lists. -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
CHTCollectionViewWaterfallLayout
The waterfall (i.e., Pinterest-like) layout for UICollectionView. -
MCSwipeTableViewCell
👆 Convenient UITableViewCell subclass that implements a swippable content to trigger actions (similar to the Mailbox app). -
VTMagic
VTMagic is a page container library for iOS. -
YBSlantedCollectionViewLayout
A CollectionView Layout displaying a slanted cells -
HGPlaceholders
Nice library to show placeholders and Empty States for any UITableView/UICollectionView in your project -
ReverseExtension
A UITableView extension that enables cell insertion from the bottom of a table view. -
TimelineTableViewCell
Simple timeline view implemented by UITableViewCell -
Bohr
Bohr allows you to set up a settings screen for your app with three principles in mind: ease, customization and extensibility. -
CenteredCollectionView
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift -
BATabBarController
A TabBarController with a unique animation for selection -
CascadingTableDelegate
A no-nonsense way to write cleaner UITableViewDelegate and UITableViewDataSource in Swift. -
ExpandableCell
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 5 -
CardsLayout
:star: Custom card-designed CollectionView layout -
GLTableCollectionView
Netflix and App Store like UITableView with UICollectionView, written in pure Swift 4.2 -
FMMosaicLayout
A drop-in mosaic collection view layout with a focus on simple customizations. -
ListPlaceholder
ListPlaceholder is a swift library allows you to easily add facebook style animated loading placeholder to your tableviews or collection views. -
SwiftSpreadSheet
Spreadsheet CollectionViewLayout in Swift. Fully customizable. 🔶 -
MYTableViewIndex
A pixel perfect replacement for UITableView section index, written in Swift -
TableFlip
A simpler way to do cool UITableView animations! (╯°□°)╯︵ ┻━┻ -
TableViewDragger
A cells of UITableView can be rearranged by drag and drop. -
DataSources
💾 🔜📱 Type-safe data-driven CollectionView, TableView Framework. (We can also use ASCollectionNode) -
DTTableViewManager
Protocol-oriented UITableView management, powered by generics and associated types. -
YNExpandableCell
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 4 -
SwiftReorder
Easy UITableView drag-and-drop cell reordering -
TLIndexPathTools
TLIndexPathTools is a small set of classes that can greatly simplify your table and collection views. -
CollapsibleTableSectionViewController
:tada: Swift library to support collapsible sections in a table view. -
TLLayoutTransitioning
Enhanced transitioning between UICollectionView layouts in iOS. -
ExpyTableView
Make your table view expandable just by implementing one method. -
PagingView
Infinite paging, Smart auto layout, Interface of similar to UIKit. -
RHPreviewCell
I envied so much Spotify iOS app this great playlist preview cell 😍, I decided to create my own one 🌶. Now you can give your users ability to quick check "what content is hidden under your UITableViewCell". Great think is that this Library not requires 3D Touch support from user device💥. -
ASCollectionView
Lightweight custom collection view inspired by Airbnb. -
TRMosaicLayout
A mosaic collection view layout inspired by Lightbox's Algorithm, written in Swift 🔶 -
SquareMosaicLayout
An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations :large_orange_diamond: -
SectionScrubber
A component to quickly scroll between collection view sections -
HoverConversion
HoverConversion realized vertical paging with UITableView. UIViewController will be paging when reaching top or bottom of UITableView contentOffset. -
TORoundedTableView
A subclass of UITableView that styles it like Settings.app on iPad -
GenericDataSource
A generic small reusable components for data source implementation for UITableView/UICollectionView in Swift. -
WheelPicker
Customizable wheel picker view implementation for iOS. -
PJFDataSource
PJFDataSource is a small library that provides a simple, clean architecture for your app to manage its data sources while providing a consistent user interface for common content states (i.e. loading, loaded, empty, and error). -
AZCollectionViewController
Easy way to integrate pagination with dummy views in CollectionView, make Instagram "Discover" within minutes. -
EditDistance
Incremental update tool to UITableView and UICollectionView -
AZTableViewController
Elegant and easy way to integrate pagination with dummy views -
ThreeLevelAccordian
Three Level Accordian View for IOS -
ios-dragable-table-cells
Objective-C library for drag-n-drop of UITableViewCells in a navigation hierarchy of view controllers.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of KDDragAndDropCollectionView or a related project?
README
Drag and Drop Collection Views
Written for Swift 4.0, it is an implementation of Dragging and Dropping data across multiple UICollectionViews.
Try it on Appetize.io!
Requirements
- iOS 8.0+
- XCode 9.0+
- Swift 4.0 +
Installation
Cocoa Pods
pod 'KDDragAndDropCollectionViews', '~> 1.5.2'
Manual
Add the files in Classes/
to your project.
Quick Guide
Make the UICollectionView of interest a KDDragAndDropCollectionView
Then set a class as dataSource implementing the KDDragAndDropCollectionViewDataSource
protocol.
class ViewController: UIViewController, KDDragAndDropCollectionViewDataSource {
@IBOutlet weak var firstCollectionView: KDDragAndDropCollectionView!
@IBOutlet weak var secondCollectionView: KDDragAndDropCollectionView!
@IBOutlet weak var thirdCollectionView: KDDragAndDropCollectionView!
var data : [[DataItem]] = [[DataItem]]() // just for this example
var dragAndDropManager : KDDragAndDropManager?
override func viewDidLoad() {
let all = [firstCollectionView, secondCollectionView, thirdCollectionView]
self.dragAndDropManager = KDDragAndDropManager(canvas: self.view, collectionViews: all)
}
}
The only responsibility of the user code is to manage the data that the collection view cells are representing. The data source of the collection views must implement the KDDragAndDropCollectionViewDataSource
protocol.
In the example we have 3 UICollectionViews distinguishable by their tags (bad practice, I know... but it's only an example ;-) and a data array holding 3 arrays respectively. In a case like this, an implementation of the above could be:
func collectionView(collectionView: UICollectionView, dataItemForIndexPath indexPath: NSIndexPath) -> AnyObject {
return data[collectionView.tag][indexPath.item]
}
func collectionView(collectionView: UICollectionView, insertDataItem dataItem : AnyObject, atIndexPath indexPath: NSIndexPath) -> Void {
if let di = dataItem as? DataItem {
data[collectionView.tag].insert(di, atIndex: indexPath.item)
}
}
func collectionView(collectionView: UICollectionView, deleteDataItemAtIndexPath indexPath : NSIndexPath) -> Void {
data[collectionView.tag].removeAtIndex(indexPath.item)
}
func collectionView(collectionView: UICollectionView, moveDataItemFromIndexPath from: NSIndexPath, toIndexPath to : NSIndexPath) -> Void {
let fromDataItem: DataItem = data[collectionView.tag][from.item]
data[collectionView.tag].removeAtIndex(from.item)
data[collectionView.tag].insert(fromDataItem, atIndex: to.item)
}
func collectionView(_ collectionView: UICollectionView, indexPathForDataItem dataItem: AnyObject) -> IndexPath? {
guard let candidate = dataItem as? DataItem else { return nil }
for (i,item) in data[collectionView.tag].enumerated() {
if candidate != item { continue }
return IndexPath(item: i, section: 0)
}
return nil
}
Advanced Use
Prevent specific Items from being Dragged and/or Dropped
For a finer tuning on what items are draggable and which ones are not we can implement the following function from the KDDragAndDropCollectionViewDataSource
protocol
func collectionView(_ collectionView: UICollectionView, cellIsDraggableAtIndexPath indexPath: IndexPath) -> Bool {
return indexPath.row % 2 == 0
}
Data Items and Equatable
In the example code included in this project, I have created a DataItem
class to represent the data displayed by the collection view.
class DataItem : Equatable {
var indexes: String
var colour: UIColor
init(indexes: String, colour: UIColor = UIColor.clear) {
self.indexes = indexes
self.colour = colour
}
static func ==(lhs: DataItem, rhs: DataItem) -> Bool {
return lhs.indexes == rhs.indexes && lhs.colour == rhs.colour
}
}
In the course of development you will be making your own types that must comform to the Equatable
protocol as above. Each data item must be uniquely idenfyiable so be careful when creating cells that can have duplicate display values as for example a "Scrabble" type game where the same letter appears more than once. In cases like these, a simple identifier will do to implement the equality.
*Note that all licence references and agreements mentioned in the KDDragAndDropCollectionView README section above
are relevant to that project's source code only.