Skip to content

Instantly share code, notes, and snippets.

View robertjpayne's full-sized avatar

Robert Payne robertjpayne

View GitHub Profile
let _name = Observable<String>("Hello")
var name: ObservableOf<String> {
return ObservableOf(self._name)
}
var scope: NSString? = "Yeehaw"
self.name.observe { (oldValue, newValue) -> Void in
print("\(oldValue) => \(newValue)")
}.scopeTo(scope!)
self._name.value = "Payne"