HoloTableViewDiffPlugin 1.0.0

HoloTableViewDiffPlugin 1.0.0

Maintained by gonghonglou.



 
Depends on:
HoloTableView>= 0
DeepDiff>= 0
 

  • By
  • gonghonglou

HoloTableViewDiffPlugin

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

What's for

HoloTableViewDiffPlugin is a plugin for HoloTableView framework, which provide the diff reload actions support for DeepDiff.

To use it, simply make sure you use DeepDiff and import this plugin.

Usage

let tableView = UITableView.init(frame: self.view.bounds, style: .plain)
self.view.addSubview(tableView)

tableView.holo_makeRows { (make) in
    for item in [Int]() {
        _ = make.row(TableViewCell.self).model(item).diffId(item)
    }
}
tableView.reloadData()

// diff reload
tableView.stored()

tableView.holo_removeAllSections()
tableView.holo_makeRows { (make) in
    for item in [Int]() {
        _ = make.row(TableViewCell.self).model(item).diffId(item)
    }
}

tableView.reload()

If the tableView has been reload and then you want to diff reload, you need to perform tableView.stored() before tableView.holo_makeRows{}.

Installation

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

pod 'HoloTableViewDiffPlugin'

Author

gonghonglou, [email protected]

License

HoloTableViewDiffPlugin is available under the MIT license. See the LICENSE file for more info.