Description
Powerful generic-based UICollectionView management framework, written in Swift 3.
DTCollectionViewManager alternatives and similar libraries
Based on the "Data Management" category.
Alternatively, view DTCollectionViewManager alternatives based on common mentions on social networks and blogs.
-
swift-algorithm-club
Algorithms and data structures in Swift, with explanations! -
SwiftyJSON
The better way to deal with JSON data in Swift. -
FMDB v2.7
A Cocoa / Objective-C wrapper around SQLite -
Realm
Realm is a mobile database: a replacement for Core Data & SQLite -
SQLite.swift
A type-safe, Swift-language layer over SQLite3. -
ObjectMapper
Simple JSON Object mapping written in Swift -
GRDB.swift
A toolkit for SQLite databases, with a focus on application development -
SwiftyUserDefaults
Modern Swift API for NSUserDefaults -
HandyJSON
A handy swift json-object serialization/deserialization library -
CoreStore
Unleashing the real power of Core Data with the elegance and safety of Swift -
AlamofireObjectMapper
An Alamofire extension which converts JSON response data into swift objects using ObjectMapper -
Disk
Delightful framework for iOS to easily persist structs, images, and data -
FileKit
Simple and expressive file management in Swift -
SugarRecord
CoreData/Realm sweet wrapper written in Swift -
Gloss
[Deprecated] A shiny JSON parsing library in Swift :sparkles: Loved by many from 2015-2021 -
FileBrowser
Finder-style iOS file browser written in Swift -
fluent
Vapor ORM (queries, models, and relations) for NoSQL and SQL databases -
QueryKit
A simple CoreData query language for Swift and Objective-C. -
DefaultsKit
Simple, Strongly Typed UserDefaults for iOS, macOS and tvOS -
AEXML
Swift minion for simple and lightweight XML parsing -
Fuzi
A fast & lightweight XML & HTML parser in Swift with XPath & CSS support -
FileProvider
FileManager replacement for Local, iCloud and Remote (WebDAV/FTP/Dropbox/OneDrive) files -- Swift [GET https://api.github.com/repos/amosavian/FileProvider: 403 - Repository access blocked] -
EVReflection
Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift -
Decodable
[Probably deprecated] Swift 2/3 JSON unmarshalling done (more) right -
Algorithm
Algorithm is a library of tools that is used to create intelligent applications. -
Graph
Graph is a semantic database that is used to create data-driven applications. -
Zephyr
Effortlessly synchronize UserDefaults over iCloud. -
AlecrimCoreData
a simple CoreData wrapper library written in Swift. -
Realm+JSON
A concise Mantle-like way of working with Realm and JSON. -
XMLCoder
Easy XML parsing using Codable protocols in Swift -
SQLiteDB
Basic SQLite wrapper for Swift 4.x and lightweight ORM for accessing underlying tables in an SQLite database -
CoreXLSX
Excel spreadsheet (XLSX) format parser written in pure Swift -
Himotoki
A type-safe JSON decoding library purely written in Swift -
JSONHelper
✌ Convert anything into anything in one operation; JSON data into class instances, hex strings into UIColor/NSColor, y/n strings to booleans, arrays and dictionaries of these; anything you can make sense of! -
json-swift
A basic library for working with JSON in Swift. -
Genome
A simple, type safe, failure driven mapping library for serializing JSON to models in Swift 3.0 (Supports Linux) -
MongoKitten
Native MongoDB driver for Swift, written in Swift -
CodableAlamofire
An extension for Alamofire that converts JSON data into Decodable objects. -
SwiftData
simple and Effective SQLite Handling in Swift.
WorkOS - The modern identity platform for B2B SaaS
* 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 DTCollectionViewManager or a related project?
README
DTCollectionViewManager
Features
- [x] Powerful mapping system between data models and cells, headers and footers
- [x] Automatic datasource and interface synchronization.
- [x] Flexible Memory/CoreData/Realm/diffable datasource storage options
- [x] Powerful compile-time safe events system, that covers all of UICollectionView delegate methods
- [x] Views created from code, XIB, or storyboard, automatic registration and dequeue
- [x] Can be used with UICollectionViewController, or UIViewController with UICollectionView
- [x] Built-in support for iOS 14 UICollectionView.CellRegistration and content configuration
- [x] Unified syntax with DTTableViewManager
- [x] [Complete documentation](Documentation)
- [x] API Reference
Requirements
- Xcode 12+
- iOS 11.0+ / tvOS 11.0+ / macCatalyst 13.0+
- Swift 5.3+
If you need Xcode 11 support or Swift 4...Swift 5.2, or iOS 8...iOS 10 support, you can use 7.x releases.
Installation
Swift Package Manager
Add package into Xcode Project settings -> Swift Packages
CocoaPods:
pod 'DTCollectionViewManager', '~> 10.0.0'
Quick start
Let's say you have an array of Posts you want to display in UICollectionView. To quickly show them using DTCollectionViewManager, here's what you need to do:
- Create UICollectionViewCell subclass, let's say PostCell and adopt
ModelTransfer
protocol:
class PostCell : UICollectionViewCell, ModelTransfer {
func update(with model: Post) {
// Fill your cell with actual data
}
}
- In your view controller:
class PostsViewController: UICollectionViewController, DTCollectionViewManageable {
override func viewDidLoad() {
super.viewDidLoad()
// Register PostCell to be used with this controller's collection view
manager.register(PostCell.self)
// Populate datasource
manager.memoryStorage.setItems(posts)
}
}
Make sure your UICollectionView outlet is wired to your class (or use UICollectionViewController subclass). If you have a PostCell.xib file, it will be automatically used for dequeueing PostCell.
- That's it! It's that easy!
Of course, cool stuff does not stop there, framework supports all datasource and delegate methods as closures, conditional mappings and much much more! Choose what interests you in the next section of readme.
Burning questions
Starter pack
- [Why do I need this library?](Documentation/Why.md)
- [How data models are mapped to cells?](Documentation/Mapping.md)
- [Can I use unsubclassed UICollectionViewCell or UICollectionReusableView (for example UICollectionViewListCell)?](Documentation/Mapping.md#without-modeltransfer)
- [How can I register views to dequeue from code/xib/storyboard?](Documentation/Registration.md)
- [How can I use the same cells differently in different places?](Documentation/Conditional%20mappings.md)
- [What datasource options do I have?(e.g. memory/CoreData/Realm/diffable datasources)](Documentation/Datasources.md)
- [How can I implement datasource/delegate methods from
UICollectionView
?](Documentation/Events.md)
Advanced
- [Can I implement delegate methods instead of using DTCollectionViewManager event closures?](Documentation/Events.md#can-i-still-use-delegate-methods)
- [How can I react to and customize UICollectionView updates?](Documentation/CollectionViewUpdater.md)
- [What if something goes wrong?](Documentation/Anomalies.md)
Sample code and documentation
- [DTCollectionViewManager sample code](Example)
- [Documentation](Documentation)
- Sample code for Drag&Drop integration
Thanks
- Alexey Belkevich for providing initial implementation of CellFactory.
- Michael Fey for providing insight into NSFetchedResultsController updates done right.
- Nickolay Sheika for great feedback, that helped shaping 3.0 release and future direction of the library.
- Artem Antihevich for great discussions about Swift generics and type capturing.