The fourth version of RAC. ReactiveCocoa (RAC) is a Cocoa framework inspired by Functional Reactive Programming. It provides APIs for composing and transforming streams of values over time.
Questions tagged [reactive-cocoa-4]
48 questions
8
votes
1 answer
How do I convert a RACSignal to a SignalProducer in ReactiveCocoa 5?
In ReactiveCocoa 4, we could convert a RACSignal into a SignalProducer using toSignalProducer(). This method does not exist in ReactiveCocoa 5, so how can we do the same thing?

Luke
- 7,110
- 6
- 45
- 74
8
votes
1 answer
Why doesn't SignalProducer return a Signal?
I feel like I understand all of the basic components of ReactiveCocoa (conceptually), by understanding how to connect all of the pieces together is still a bit confusing.
For example, after reading about Signal, I fully expected SignalProducer to…

Jason Pepas
- 424
- 5
- 12
4
votes
1 answer
What happens to individual failures with combineLatest?
If i have two SignalProducers (really they are API service requests so they only send 'next' once), and combine them with combineLatest (as i want to dismiss a loading spinner once both finish), what happens if one of them fails? Or both fail?
Does…

Chris
- 39,719
- 45
- 189
- 235
3
votes
1 answer
ReactiveCocoa create a signal producer that can emit manually
I want to model the following scenario using ReactiveCocoa in swift.
class A{
let flagSignalProducer = A Signal Producer
someSignal.takeUntil(a signal that I can trigger manually which is created out of flagSignalProducer).subscribeNext{ (_)…

Swift Hipster
- 1,604
- 3
- 16
- 24
3
votes
2 answers
Create a moving average (and other FIR filters) using ReactiveCocoa
I'm still getting started with ReactiveCocoa and functional reactive programming concepts, so maybe this is a dumb question.
ReactiveCocoa seem naturally designed to react to streams of live data, touch events or accelerometer sensor input etc.
Is…

chris838
- 5,148
- 6
- 23
- 27
2
votes
1 answer
Missing rac_signalForControlEvents in RAC5
Now i update the ReactiveCocoa to 5(version 4.2.2) for the swift3.
But there has not api rac_signalForControlEvents(.TouchUpInside) for UIButton,which i use in previous version
Is there anyone know? How to resolve that?

Mike Lu
- 51
- 1
- 6
2
votes
1 answer
ReactiveCocoa 4 - Delaying and filtering signal events
I am implementing a search textfield using ReactiveCocoa 4, and want to only hit the search API after no text has been inputted for X amount of time. I have done this previously by canceling previously scheduled and firing off a "executeSearch"…

hobosf
- 309
- 3
- 12
2
votes
1 answer
Transform delegate callbacks to SignalProducer events?
I have an object that is a delegate. There are 6 delegate callbacks informing the delegate about the state of things. I have a MySpecialEvent swift enum that represents these states.
Can you help me figure out how to correctly initialise a…

Earl Grey
- 7,426
- 6
- 39
- 59
2
votes
2 answers
Simple UIGestureRecogniser example with ReactiveCocoa 4
Struggling to get a simple ReactiveCocoa 4 example working.
I have pan gesture recogniser for a view in my hierarchy.
I have an intended destination class for my touch events (lets assume I want to generate network packets based on the touch…

chris838
- 5,148
- 6
- 23
- 27
1
vote
1 answer
Dismissing keyboard in UITextField with RAC(5)?
Newbie to ReactiveCocoa and ReactiveSwfit here... Sorry if the answer is obvious.
I am trying to adapt the Start Developing iOS Apps with Swift sample to ReactiveSwift / ReactiveCocoa, and I am running into an issue with "translating" the…

Nick
- 321
- 3
- 16
1
vote
1 answer
How can I convert a RACDisposable to a Disposable in ReactiveCocoa 5?
In ReactiveCocoa 5, how can I convert a RACDisposable to a Disposable? If I try to add a RACDisposable to a CompositeDisposable, I get "Binary operator '+=' cannot be applied to operands of type 'CompositeDisposable' and 'RACDisposable'".

Luke
- 7,110
- 6
- 45
- 74
1
vote
1 answer
How to chain SignalProducers passing along the results
Given functions multiply() and convert() (minimal examples of the concept, I'm actually planning to query a remote server inside each function), what is a shorter way to implement multiplyAndConvert()?
// call two async functions passing the result…

Mark Lilback
- 1,154
- 9
- 21
1
vote
0 answers
ReactiveCocoa Swift crash
I have a weird crash in Hockeyapp for my application
Thread 0 Crashed:
0 Tricount 0x00000001001f51d8 View.BalancesInteractor.balancesInfo.getter : View.BalanceInfoModel (BalancesInteractor.swift:22)
1 Tricount …

Erdem Inan
- 41
- 3
1
vote
1 answer
ReactiveCocoa-How can i avoid to multiple subscribe the signal in collectionView's cell
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(identifier, forIndexPath: indexPath) as! ComposeCell
…

Ye HB
- 11
- 2
1
vote
1 answer
Async image loading with ReactiveCocoa (4.2.1) and Swift
I'm a beginner using ReactiveCocoa with Swift for the first time. I'm building an app showing a list of movies and I'm using the MVVM pattern. My ViewModel looks like this:
class HomeViewModel {
let title:MutableProperty =…

Claus
- 5,662
- 10
- 77
- 118