Questions tagged [racsignal]
42 questions
23
votes
2 answers
Has anybody made self updating mutable table view based on a RACSignal?
Now that there's a full support for KVO, has anybody made a mutable table view that takes a RACSignal as its dataSource? Ideally something that doesn't require any configuration.
RACSignal *commentsSignal;
UITableView *table = [UITableView…

Michael
- 1,212
- 1
- 14
- 17
14
votes
1 answer
Splitting an RACSignal to eliminate state
I'm using ReactiveCocoa to update a UILabel whilst a UIProgressView counts down:
NSInteger percentRemaining = ...;
self.progressView.progress = percentRemaining / 100.0;
__block NSInteger count = [self.count];
[[[RACSignal interval:0.05…

Carlton Gibson
- 7,278
- 2
- 36
- 46
5
votes
1 answer
Reactive Cocoa 5 and ReactiveSwift network requests handling
I'm trying to figure out if network requests handling can be implemented suitable to my needs using ReactiveSwift and RAC5.
Under topic Migrate from RACSignal to ReactiveSwift or RAC5 I was told it can be done with SignalProducer, but digging deeper…

Stas Ivanov
- 917
- 1
- 10
- 22
4
votes
2 answers
ReactiveCocoa 5, ReactiveSwift network sub-request handling & best practice
I'm trying to find best practice to handle multiple sub-requests per each value got from parent request. I'm trying to use the same logic as here - Reactive Cocoa 5 and ReactiveSwift network requests handling, but have some problems.
What we have…

Stas Ivanov
- 917
- 1
- 10
- 22
4
votes
1 answer
Create a RACSignal which sends error if RACSignal sends next
With ReactiveCocoa I'm sure there is a better way than doing this?
RACSignal *crashSignal = [cancelSignal tryMap:^id(id value, NSError **errorPtr) {
*errorPtr = [self createError];
return nil;
}];

hfossli
- 22,616
- 10
- 116
- 130
3
votes
1 answer
Migrate from RACSignal to ReactiveSwift or RAC5
I'm new with Swift, and that's why I'm new with Reactive Cocoa v5 or Reactive Swift.
Previously I used RACSignal with RAC 2.x and I liked to do something like this:
- (RACSignal *)signalForGET:(NSString *)URLString parameters:(NSDictionary…

Stas Ivanov
- 917
- 1
- 10
- 22
3
votes
1 answer
ReactiveCocoa : Chain a signal with a repeating signal
Using ReactiveCocoa, how can I chain a signal from a repeating one?
I would like to do something like this:
Every 5 seconds, I run a network request.
For this purpose, I created a repeating signal
RACSignal *each5SecondSignal = [[[RACSignal…

user3620372
- 187
- 1
- 9
3
votes
1 answer
ReactiveCocoa signal for fetching data upon observation of authentication status
Fairly new to ReactiveCocoa, I'm trying to build a signal that asynchronously fetches some resource from a remote API to which the client has to authenticate first. Authentication is handled by first getting a token from the API, and then passing it…

beauby
- 550
- 3
- 11
3
votes
1 answer
Is there a way for a RACSignal to keep receiving `next`s after an error?
I'm trying to listen for both location updates and errors (through CLLocationManagerDelegate), and support the ability to track errors but filter them out of the final signal and keep it alive.
When I subscribe to the location signal (via…

drhr
- 2,261
- 2
- 17
- 35
2
votes
0 answers
How to Cancel NSURLSessionDataTask 'Inside' A RACSignal
I am using Reactive Cocoa to merge & collect multiple network requests together (as RACSignals) like so:
[[[RACSignal merge:requestSignals] collect] subscribeNext:^(NSArray *results){...}
Each individual RACSignal is created like so:
- (RACSignal…

jac300
- 5,182
- 14
- 54
- 89
2
votes
1 answer
ReactiveCocoa `rac_textSignal` map completed event
I'm new to Reactive Cocoa.
I need to trigger stuff when white space gets added to a UITextView, after replacing the text view text with a trimmed version. So basically I am looking for some sort of completion event. I imagine this is a…

Elise
- 5,086
- 4
- 36
- 51
2
votes
1 answer
How to set up a pipeline for dynamically created RACSignals - dynamic Form application - Reactive Cocoa
I'm working on a Form which consists of dynamically created Fields, and I'd like each Field to have a method that returns a RACSignal which sends a nextEvent each time the Field's value changes.
The payload of the nextEvent should include BOOL that…

flyingobjex
- 65
- 1
- 5
2
votes
1 answer
How to map error from sendError: on RACSignal
This is very cumbersome
RACSignal *originalSignal = ...;
RACSignal *mappedSignal = [[[[[originalSignal publish] autoconnect] materialize] map:^id(RACEvent *event) {
if(event.eventType == RACEventTypeError)
{
return [RACEvent…

hfossli
- 22,616
- 10
- 116
- 130
1
vote
1 answer
Reactive ObjC emit sequence with time interval
I am trying to emit a sequence of numbers with a delay between each emission. I have a NSIndexSet with a series of numbers,
[[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 100)]
Now I want to emit each number with a delay,Like emit number 2…

Easy Coder
- 295
- 1
- 3
- 14
1
vote
0 answers
ReactiveCocoa RACObserve self model trouble
I have a model in my ViewController (ex @property (nonatomic, strong) Model *model;)
There are 2 properties (property1 , property2).
I'm trying to observe these properties via RACObserve macro and then use combineLatest
RACSignal *sig1 =…

Artem Z.
- 1,243
- 2
- 14
- 36