nahive / doppelganger-swift

Array diffs as collection view wants it - now in Swift ✨

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bad ux good ux

Doppelganger-Swift

Version License Platform Build Status Carthage compatible

Inspired by Doppelganger written in Swift

Features

  • Removes confusion from users when data changes
  • Animates moving, inserting and deleting rows/items
  • Example
  • Working with sections

Changelog

Installation

Doppelganger-Swift is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "Doppelganger-Swift"

Doppelganger-Swift is available through Carthage. To install it, simply add the following line to your Cartfile:

github "nahive/Doppelganger-Swift"

Using

let oldDataSource = dataSource
dataSource = newDataSource
let diffs = NIArrayDiffUtility.diffForCurrentArray(dataSource, previousArray: oldDataSource)
    
tableView.ni_applyBatchChangesForRows(diffs!, inSection: 0, withRowAnimation: .Right)

Contributing

If you found a bug, open an issue.

If you have a feature request, open an issue.

If you want to contribute, submit a pull request.

License

The source code is dedicated to the public domain. See the LICENCE.md file for more information.

About

Array diffs as collection view wants it - now in Swift ✨

License:The Unlicense


Languages

Language:Swift 89.3%Language:Ruby 10.7%