reactive cocoa 4 - RACObserve in RAC 4 -


i woking on new new swift 2 project using reactivecocoa4 , wondering how observe property change dit before in objc.

[racobserve(self,self.model.wifistate) subscribenext:^(id newvalue){ @strongify(self); self.wifistate = newvalue; }];

do have hint?

thanks

thierry

you can same using dynamicproperty:

dynamicproperty(object: self.model, keypath: "wifistate")     .signal // or `producer` if care current value     .map { $0 as! wifistate } // necessary because there no way infer type of given keypath.     .observenext { [unowned self] self.wifistate = $0 } 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -