Latest 1.0.0
Homepage https://github.com/Geektree0101/RxASDiff
License MIT
Platforms ios 9.0
Dependencies Texture, RxSwift, RxCocoa, DeepDiff
Authors

CI Status
Version
License
Platform

alt text
RxASDiff is Texture Reactive Diff Library built on DeepDiff(ref: https://github.com/onmyway133/DeepDiff)

Example

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

create diff output


let relay = BehaviorRelay<[HashableObject]>(value: [])
// Behavior or Publich or etc all Observer available

DiffObserver<HashableObject>.rxDiff(relay.asObservable()).subscribe( ... ).disposed(by: ...)
// output: Array<Change<HashableObject>> ref: https://github.com/onmyway133/DeepDiff

convert diff to indexPaths object


let relay = BehaviorRelay<[HashableObject]>(value: [])
// Behavior or Publich or etc all Observer available

DiffObserver<HashableObject>.rxDiff(relay.asObservable(), section: Int).subscribe().disposed()
// output: ChangeWithIndexPath ref: https://github.com/onmyway133/DeepDiff

convenience apply diff output onto tableNode or collectionNode

    func case1() {
        DiffObserver<TestModel>
            .rxDiff(relay.asObservable(), section: 1)
            .subscribe(onNext: { iter in
                self.tableNode.applyDiff(iter, completion: nil)
            }).disposed(by: bag)
    }

    func case2() {
        let diffObserver = DiffObserver<TestModel>.rxDiff(relay.asObservable())
        tableNode.rx
            .applyDiff(diffObserver, section: 1, completion: nil)
            .disposed(by: bag)
    }

Requirements

  • Xcode <~ 9.3
  • Swift <~ 4.1
  • iOS <~ 9.3

Installation

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

pod 'RxASDiff'

Author

Geektree0101, [email protected]

License

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

Latest podspec

{
    "name": "RxASDiff",
    "version": "1.0.0",
    "summary": "Reactive Diff Library on Texture built on DeepDiff",
    "description": "Texture x RxSwift x Paul Heckel Diff Algorithm",
    "homepage": "https://github.com/Geektree0101/RxASDiff",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Geektree0101": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Geektree0101/RxASDiff.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "RxASDiff/Classes/**/*",
    "dependencies": {
        "Texture": [
            "2.6"
        ],
        "RxSwift": [
            "~> 4.0"
        ],
        "RxCocoa": [
            "~> 4.0"
        ],
        "DeepDiff": [
            "~> 1.2"
        ]
    }
}

Pin It on Pinterest

Share This