A simple observer framework in Swift
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Observable.xcodeproj
Observable
README.md

README.md

Observable

Observable is a simple observer framework, like the Lite version of RxSwift

Example

class Man {
    let age = Variable<Int>(0)
}

let peter = Man()
_ = peter.age.asObserver().subscribeNext { (age) in
    print("Age change   \(age)")
}
peter.age.value = 1
peter.age.value = 18

// Output
// Age change   1
// Age change   18