I am using Swift, ReactiveSwift, and ReactiveCocoa.
Assuming I have a single SignalProducer
, is there a way for multiple UI components to update when an Event
is produced?
eg.
let sp = SignalProducer<Int, NoError> = // ...
label1.reactive.text <~ sp.map { String($0) }
label2.reactive.text <~ sp.map { "You entered \(String($0)) }
The issue I currently face is that the SignalProducer
is started as soon as I use the <~
operator. As such, the producer is called twice. This isn't desirable when the producer is, say, a network request.