Questions tagged [reactive-cocoa]

ReactiveCocoa (RAC) is a Swift framework inspired by Functional Reactive Programming. It provides APIs for composing and transforming streams of values.

ReactiveCocoa (RAC) is a Swift framework inspired by Functional Reactive Programming. It provides APIs for composing and transforming streams of values.

860 questions
0
votes
1 answer

Queue blocks and execute the queue when ready

I want to make a queue that I can add blocks to and start the processing when a propery; isReady is true. I could do this with NSOperationQueue and NSBlockOperation, but I would love to see an implementation done with ReactiveCocoa only. How can I…
Andreas Aarsland
  • 945
  • 2
  • 11
  • 27
0
votes
1 answer

Combining ReactiveCocoa with non - MVVM / ReactiveCocoa in iOS

Can I use ReactiveCocoa to write my app which includes a sub-project (existing/static library) project that doesn't follow MVVM or Reactive Cocoa in iOS?
Smitha
  • 6,110
  • 24
  • 90
  • 161
0
votes
1 answer

Reactive Cocoa - try catch and replay

I have implemented function to download my object ELRun from the server. My code snippet: - (void)_requestUserReservation { [[[networkManager requestRun] subscribeNext:^(ELRun *run) { [self _setupRun:run]; } error:^(NSError *error)…
Szu
  • 2,254
  • 1
  • 21
  • 37
0
votes
1 answer

Using RACCommand with MVVM pattern, sending parameters to ViewModel

I'm using ReactiveCocoa framework at my app for the power using MVVM design pattern. So for every Controller, I have a ViewModel. and the Controller is binded to his ViewModel. UIButton binding will look like so: @implementation…
MCMatan
  • 8,623
  • 6
  • 46
  • 85
0
votes
1 answer

Chaining RACSignals and rollback

I'm relatively new to ReactiveCocoa and was wondering how to chain a sequence of REST GET calls together so they perform in order. If one of the calls errors, then the whole process will roll back. So I'm using pod 'AFNetworking-RACExtensions',…
elprl
  • 1,940
  • 25
  • 36
0
votes
1 answer

KVO on helper property

I have a property to an object instance in my class @property(nonatomic, strong) MyObject *myObject; And I expose a helper property. @property(nonatomic, assign, readonly) BOOL hasMyObject Which does return self.myObject != nil; I need…
Karmeye
  • 1,399
  • 1
  • 8
  • 16
0
votes
1 answer

ReactiveCocoa and delegates

I'm trying to communicate with the login service and update the UI the reactive way. The thing is that my login service works with delegates and almost every example I find works with blocks. I wrote a solution that works, but it seems a bit to…
Odrakir
  • 4,254
  • 1
  • 20
  • 52
0
votes
3 answers

Reactive cocoa, combineLatest firing many times

I have three signals that represent interdependent properties: city, performer and event. If city is changed or set to nil, it also sets the performer and event to nil. When this happens, the combineLatest subscription on those signals fires three…
Rich Lowenberg
  • 1,089
  • 1
  • 8
  • 12
0
votes
1 answer

How use ReactiveCocoa to move from first to last UITextField

I want to use ReactiveCocoa in new project that I work on, nothing fancy because project is as always ASAP but I want to start learning this cool framework in practice. I have View that is ideal to implement as I thought something simple with…
Michal Gumny
  • 1,770
  • 1
  • 16
  • 24
0
votes
1 answer

ReactiveCocoa and MVVM confusion

I am reading a article from raywenderlinch: http://www.raywenderlich.com/74106/mvvm-tutorial-with-reactivecocoa-part-1 I noticed there are protocols in Model and ViewModel folder. There is RWTFlickrSearch protocol, and RWTViewModelServices protocol.…
yong ho
  • 3,892
  • 9
  • 40
  • 81
0
votes
2 answers

ReactiveCocoa, is there a better way to RAC first and refresh later

Here's the situation I've a ViewModel (ok, follow the MVVM architecture), which has an array property, called "specialtySegments", and a flag property called "generic", I wanna when the generic value is changed, update the specialtySegments value…
xmkevinchen
  • 1,506
  • 1
  • 14
  • 17
0
votes
1 answer

Is it right that ReactiveCocoa's RACObserve is to replace the set methods for properities?

After create a instance of a class. I bind some properties by RAC macros. _theTable = [[ScrollableTable alloc] initWithFrame:CGRectMake(0, 0, 1024, 768)]; [_theTable setScrollEnabled:YES]; [_theTable setBounces:YES]; [_theTable…
benoitcn
  • 149
  • 1
  • 12
0
votes
1 answer

enabled property from UIBarButtonItem does not take effect when a RACCommand is defined

In the snipped bellow, I want to change the enableness status of self.btnSave, that has a RACCommand defined. The second block actually tries to change it based on another external condition (tableview selection). It seams that the rac_command takes…
SauloT
  • 153
  • 7
0
votes
1 answer

RAC'ing property to be set

Is it possible to observe a property of an object that is yet to be set? I am trying to implement MVVM pattern and here's what I've got so far: In my view controller I instantiate view model and model: - (void)viewDidLoad { [super viewDidLoad]; …
Eimantas
  • 48,927
  • 17
  • 132
  • 168
0
votes
1 answer

ReactiveCocoa binding "networkActivityIndicator" Crushes

I have this code: RAC(self.viewModel , password) = self.signupCell.passwordTextField.rac_textSignal; RAC(self.viewModel , userName) = self.signupCell.usernameTextField.rac_textSignal; RAC([UIApplication sharedApplication],…
MCMatan
  • 8,623
  • 6
  • 46
  • 85