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

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

authentication - ASP.NET Core 1.0. Bearer Token, cannot access custom claims -