github "gametimesf/GTObservable" == 1.1
To use, simply:
var observableLoggedIn = GTObservable<Bool>(false)
// observe all future changes
observableLoggedIn.observe(self) { [weak self] update in
print("your value changed from \(update.oldValue) to \(update.newValue)")
}
// observe all future changes AND fire with the current value at observation time
observableLoggedIn.fireThenObserve(self) { [weak self] _ in }
// update the value
observableLoggedIn.value = true
Observers are safe, and will automatically unsubscribe when your observing object is deallocated.