All Projects → DenTelezhkin → Dtcollectionviewmanager

DenTelezhkin / Dtcollectionviewmanager

Licence: mit
Protocol-oriented UICollectionView management, powered by generics and associated types.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Dtcollectionviewmanager

Thinningcoordinator
The UITableView/UICollectionView dataSource/delegate thinning coordinator, help thinning your UIViewController!
Stars: ✭ 25 (-91.67%)
Mutual labels:  datasource, delegate, uicollectionview
TinyCoordinator
The Swift version of ThinningCoordinator focus on lighter view controllers.
Stars: ✭ 18 (-94%)
Mutual labels:  uicollectionview, delegate, datasource
Dttableviewmanager
Protocol-oriented UITableView management, powered by generics and associated types.
Stars: ✭ 424 (+41.33%)
Mutual labels:  datasource, protocol, delegate
Carbon
🚴 A declarative library for building component-based user interfaces in UITableView and UICollectionView.
Stars: ✭ 1,034 (+244.67%)
Mutual labels:  datasource, delegate, uicollectionview
Flowkit
A declarative type-safe framework for building fast and flexible list with Tables & Collection
Stars: ✭ 215 (-28.33%)
Mutual labels:  datasource, delegate, uicollectionview
Rglistkit
RGListKit is a Protocol & MVVM based framework to easily populate a UITableView or UICollectionView via single api.
Stars: ✭ 178 (-40.67%)
Mutual labels:  datasource, protocol, uicollectionview
Closures
Swifty closures for UIKit and Foundation
Stars: ✭ 1,720 (+473.33%)
Mutual labels:  datasource, uicollectionview
Datasources
💾 🔜📱 Type-safe data-driven CollectionView, TableView Framework. (We can also use ASCollectionNode)
Stars: ✭ 553 (+84.33%)
Mutual labels:  datasource, uicollectionview
Genericdatasource
A generic small reusable components for data source implementation for UITableView/UICollectionView in Swift.
Stars: ✭ 127 (-57.67%)
Mutual labels:  datasource, uicollectionview
Micro
🏎Fast diffing and type safe SwiftUI style data source for UICollectionView
Stars: ✭ 77 (-74.33%)
Mutual labels:  uicollectionview, datasource
CollectionAndTableViewCompatible
A set of Swift protocols and Xcode snippets that will make it easy to do clean UITableView code
Stars: ✭ 34 (-88.67%)
Mutual labels:  uicollectionview, protocol
iOSEasyList
A data-driven UICollectionView and UITableView framework for building fast and flexible lists
Stars: ✭ 29 (-90.33%)
Mutual labels:  uicollectionview, datasource
Mspeekcollectionviewdelegateimplementation
A custom paging behavior that peeks the previous and next items in a collection view
Stars: ✭ 265 (-11.67%)
Mutual labels:  delegate
Knowage Server
Knowage is the professional open source suite for modern business analytics over traditional sources and big data systems.
Stars: ✭ 276 (-8%)
Mutual labels:  datasource
Swift Diagram Playgrounds
Drawing diagrams in Swift using a recursive enum data structure
Stars: ✭ 264 (-12%)
Mutual labels:  protocol
Ipfs Desktop
An unobtrusive and user-friendly desktop application for IPFS on Windows, Mac and Linux.
Stars: ✭ 3,710 (+1136.67%)
Mutual labels:  protocol
Knphotobrowser
📷 图片 || 视频 浏览器(本地和网络) , UIViewController + CollectionView , 完美适配 iPhone 以及 iPad ,屏幕旋转功能 , 适配SDWebImage 5.0
Stars: ✭ 296 (-1.33%)
Mutual labels:  delegate
Uicollectionviewflexlayout
A drop-in replacement for UICollectionViewFlowLayout
Stars: ✭ 277 (-7.67%)
Mutual labels:  uicollectionview
Libcsp
Cubesat Space Protocol - A small network-layer delivery protocol designed for Cubesats
Stars: ✭ 258 (-14%)
Mutual labels:  protocol
awesome-protocols
Curated list of awesome technology protocols with a reference to official RFCs
Stars: ✭ 16 (-94.67%)
Mutual labels:  protocol

CI codecov.io CocoaPod platform CocoaPod version Swift Package Manager compatible Packagist

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
  • [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', '~> 8.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:

  1. 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
    }
}
  1. 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.

  1. 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
Advanced

Sample code and documentation

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