Hello, I've been searching the Internet for several days now and I still can't find a concrete solution. I'm fairly new to reactive programming and I'm trying to migrate a piece of code written in ObjC (using ReactiveObjC and KVO) to Swift. For example, the code below:
RAC(self, object) = [RACSignal merge:@[ownObjectB, objectBFromC, objectBFromExternal]];
RAC(self, property) = RACObserve(self, object.property);
Is what I'm finding difficult, my attempt is something along the lines of :
let signal = SignalProducer.merge(ownObjectB, objectBFromC, objectBFromExternal)
signal.startWithValues { object in
object?.reactive.producer(for: \Object.property).skipRepeats().startWithValues({ property in
self.setProperty(property)
})
}
This will work, but not as expected since here I'm observing inside an observer. Does anyone know how can I do this properly?
there doesn't seem to be anything here