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
0 answers

RACSignal parallelization

I have the following signal, that I want to parallelize. I'm interested to know when the two signals inside "then" were finished. [[[[RACSignal empty] then:^{ return [RACSignal defer:^{ NSLog(@"error"); …
7ynk3r
  • 958
  • 13
  • 17
0
votes
1 answer

Authenticating with ReactiveCocoa

I'm building an app on top of ReactiveCocoa and Octokit.objC (github library). As part of my effort I'm using Octokits ReactiveCocoa signals to access resources that require authentication. A previous question 'Retrying an asynchronous operation…
Ayal
  • 440
  • 1
  • 5
  • 15
0
votes
1 answer

Data transforming with ReactiveCocoa

I'm experimenting with ReactiveCocoa and trying to solve a simple problem. I have a rest-client which fetches data in JSON like this { "entries": [ { "objectId": "123", "name": "EntryName" }, ... …
Dmitry
  • 7,300
  • 6
  • 32
  • 55
0
votes
1 answer

ReactiveCocoa: subscribe on property getter access

Can I subscribe to be notified when a property getter is called, using ReactiveCocoa? I need to set a flag that certain data needs to be updated (via network request) in the near future, because someone accessed it.
Siarhei Fedartsou
  • 1,843
  • 6
  • 30
  • 44
0
votes
2 answers

iOS Loading images in UITableViewCell with RAC

Am just starting with RAC and am wondering how to load images asynchronously in a cell within a TableView. I was trying with the example in the doc, but to be honest, I didn't understand so well... The thing is that the project is written with RAC,…
FelipeDev.-
  • 3,113
  • 3
  • 22
  • 32
0
votes
1 answer

Providing a second choice if primary choice not found in a ReactiveCocoa signal chain

I have the following code that runs through a series of image records, tries to find a record that's marked "primary", loads it, and assigns it to a UIImageView: // When there's a new image, fetch it, and set the headerView (which by default is…
leftspin
  • 2,468
  • 1
  • 25
  • 40
0
votes
2 answers

-subscribeNext: works, but RAC() doesn't

This works as expected: // Return a sequence for photos [[[[[[RACObserve(self, event.photos) filter:^BOOL(id value) { return value != nil ; }] flattenMap:^RACStream *(NSDictionary *photos) { NSLog(@"Got photos: %@" ,…
leftspin
  • 2,468
  • 1
  • 25
  • 40
0
votes
1 answer

textColor with ReactiveCocoa

when instead a textField longer the firstResponder, does not send any signal value and the text color is not correct, how can I fix it? RAC(self.textField, textColor) = [RACSignal …
iAcisclo
  • 11
  • 1
  • 1
0
votes
2 answers

Interpolate animations and bindings

Note: I'm using ReactiveCocoaLayout for signal-based animations. I have a UILabel that I'd like to bind to a NSString* property on a view model. RACSignal* statusSignal = [RACObserve(self, viewModel.status) distinctUntilChanged]; Simple enough. …
Matt Hupman
  • 195
  • 7
0
votes
1 answer

Looking for the most elegant way to chain a dependent tree of network requests with reactive cocoa?

This is the solution from my last question: Since I am new to reactiveCocoa I am a little unsure if this is the right way to go? Basicly I want to get my dependent network Requests sent serialized one after the other. They form a tree so the…
jack
  • 1,861
  • 4
  • 31
  • 52
0
votes
1 answer

How do I wait in a flattenMap block for a signal to complete before the next event is consumed?

here is my pseudo code : [[[@[ctx1,ctx2]rac_sequence]signalWithScheduler:RACScheduler.immediateScheduler] flattenMap:^RACStream *(id ctx) { // first flatten map return [RACSignal createSignal:^(id subscriber) { …
jack
  • 1,861
  • 4
  • 31
  • 52
0
votes
1 answer

RACDisposable is teared down before NSURLSessionDownloadTask finishes

I am fetching a list of images that I want to download from a server. After filtering the list , i add all my network calls to an array of signals and merge them. The thing is that the network calls start, but meanwhile the racdisposable is…
Alex Maie
  • 269
  • 3
  • 13
0
votes
1 answer

Trying to understand ReactiveCocoa

I am testing reactive cocoa. In the underneath code I would expect the output to be : name : Item 1 arr : a1 arr : a2 name : Item 2 arr : b1 arr : b2 done but I get different unpredictable results for example : name : Item 1 arr : a1 arr : b1 name…
jack
  • 1,861
  • 4
  • 31
  • 52
0
votes
1 answer

Using reactive cocoa to concisely fetch local data and then update with remote data

I am trying to implement a RACCommand that can be executed to initiate display of the freshest available data to the UI. Both sendNext: calls would return data from the local database and a remote server respectively. Is there are more concise way…
nacross
  • 2,013
  • 2
  • 25
  • 37
0
votes
1 answer

Swipe Cells with RAC

I'm building a swipeable cell adding a pan gesture to that cell. Basically, it has the same look and feel as the cells in Mailbox app, where you have a top view which you can swipe to the left or right to show another view (revealView) underneath.…