Micro banner
Micro

Open SourceSwift

Micro Overview

🏎Fast diffing and type safe SwiftUI style data source for UICollectionView.

Most of the time, we want to apply model data to cell with smart diffing. Micro provides type safe SwiftUI style data source for UICollectionView, with super fast diffing powered by DeepDiff. Just declare a State with SwiftUI style forEach and Micro will reload with animated diffing

Features
  • Supports iOS 8+
  • Declare in type safe manner with forEach
  • context provides additional information, like UICollectionView and IndexPath
  • Automatic reload with smart diffing whenever state is set
  • By default, diffing is animated, you can use dataSource.reload(newState:isAnimated:completion) to specify animated and completion
Animate reloading
By default, when you set state on DataSource, animated diffing is performed. If you want to set animated property and to listen to completion event, you can use reload method

Complex model with multiple cell types
You can declare different Cell in forEach with different kinds of cell.

Customize with subclass
DataSource is completely overridable, if you want to customize any methods, just subclass DataSource, override methods and access its state.models

Stay on top of new tools for iOS developers

Subscribe to get a convenient weekly roundup of iOS Dev Tools' newest addition
of helpful and time-saving developer tools, services, and SDKs to get your job done faster.