How to transform from RACSignal(the Objective-C version) to Signal (the Swift version)

869 Views Asked by At

e.g. How to convert cell.rac_prepareForReuseSignal to a Signal?

levelSignal
|> takeUntil( doSomeThingTo(cell.rac_prepareForReuseSignal) )
|> observe(next: { level in
    ...
    })
1

There are 1 best solutions below

0
On

Why do you to transform it to Signal? Signal is hot, already subscribed, while RACSignal is usually cold and only ready to subscribe.

You might rather transform it to the SignalProducer, so use toSignalProducer method.

Here is official documentation about these transformations