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

ReactiveCocoa's equivalent to Observable.Create

I'd like to make a custom RACSignal, but I'd prefer to not have to make a whole class. I just want to specify a block to call when observers subscribe. In .Net's Rx I would do this: return Observable.Create(observer => { ... // send items to…
Craig Gidney
  • 17,763
  • 5
  • 68
  • 136
0
votes
2 answers

RACSignal that indicates when a property returns to its initial value

I have a property, recording, that changes to YES if a UILongPressGestureRecognizer is in state UIGestureRecognizerStateBegan or UIGestureRecognizerStateChanged. How can I create an signal that will only fire when recording goes back to NO and not…
Alex
  • 8,801
  • 5
  • 27
  • 31
0
votes
1 answer

Filtering a RACSequence not working as expected

I'm trying to refresh a fetched array of objects using ReactiveCocoa, and I'd like to filter out results that have been deleted. I can't quite seem to get things working right — I expect that the filter would be passed each NSManagedObject in the…
Tony Arnold
  • 2,738
  • 1
  • 23
  • 34
0
votes
2 answers

Scanning over a merge of differently typed signals

Suppose I have a signal of arrays arraySignal, and a signal of objects addedObjectsSignal. I would like to define a third signal, modifiedArraySignal, that takes the latest array from arraySignal and adds to it the objects from addedObjectsSignal…
Tom
  • 3,831
  • 1
  • 22
  • 24
0
votes
1 answer

Communication Between Views Using ReactiveCocoa?

I'm trying to understand who Reactive Cocoa works... There's not many documentation or examples above that Framework. I need to use it to send signals between different views. In my view, I have a table and another viewcontroller, and I need, that…
user1600801
  • 269
  • 7
  • 25
0
votes
2 answers

How To Add RAC Libraries to XCode?

I'm trying to add Reactive Cocoa libraries to my Xcode project, but I can't. I'm trying to find some tutorial, because I can't understand the one in the Reactive Cocoa page.. How can I add this library to my proyect?
user1600801
  • 269
  • 7
  • 25
0
votes
1 answer

Refactoring ReactiveCocoa

I have the following code in a viewmodel: @weakify(self); [RACAbleWithStart(self.visitStartDate) subscribeNext:^(NSDate *visitStartDate) { @strongify(self); self.visit.startDate = visitStartDate; }]; [RACAbleWithStart(self.visitEndDate)…
JFoulkes
  • 2,429
  • 1
  • 21
  • 24
0
votes
1 answer

Does it make sense to use ReactiveCocoa for triggering Model persistence

I am trying to get my head into the Reactive world, and still find my understanding falling short when it comes to best practices. ReactiveCocoa seems to be used most often on the VC side of MVC. I was looking for a way to use it within the…
Loz
  • 2,198
  • 2
  • 21
  • 22
-1
votes
1 answer

How to use rac_signalForControlEvents

How can I convert same method "rap_signalForControlEvents" to last working ReactiveCocoa Version? I'm trying to build a example of the book Reactive programming with swift, but when I implemented the same method it doesn't work. I've changed the…
-1
votes
1 answer

reactivecocoa observe global variable

I have defined globalUser as a global variable in A.swift file. How to observe globalUser's changes in B.swift. // A.swift var globalUser: Dictionary? = nil // B.swift class MeViewController: UITableViewController { var user:…
ashoka
  • 1
-1
votes
1 answer

One RACSignal used at one time

I have a test example with one button. When user presses the button is called RAC_request and request is executing. If user presses this button a many times for a short time, many requests will be execute asynchronously. I want to create logic to…
Nikita Ermolenko
  • 2,139
  • 2
  • 19
  • 41
-1
votes
1 answer

does _ represent local variable?

I am pretty new to ReactiveCocoa and Objective-C. I see that in the following code there is usage of _subscribeCommand but there isn't a place where it was declared. It coincides with the subscribeCommand method. So is this a local variable? -…
Bonk
  • 1,859
  • 9
  • 28
  • 46
-1
votes
2 answers

Why does it have retain cycle here?

Here is the code from Ray tutorial about ReactiveCocoa and I can't figure out how come it has retain cycle, can someone indicate that? - (RACSignal *)signalForSearchWithText:(NSString *)text { // 1 - define the errors NSError…
Lucas Huang
  • 3,998
  • 3
  • 20
  • 29
-1
votes
2 answers

Exclusive RACCommand execution on tableView:didSelectRowAtIndexPath

I'm trying to express the following scenario in ReactiveCocoa and MVVM. There's a table view which shows a list of Bluetooth devices nearby On row selection we start a process of connecting to the selected device and display an activity indicator…
Lubiluk
  • 704
  • 5
  • 12
-1
votes
2 answers

Getting error “ReactiveCocoa/ReactiveCocoa.h” file not found

I'm developing an app using Xcode 6 and cocoa pods. But it is showing an lexical or preprocessor issue: “ReactiveCocoa/ReactiveCocoa.h” file not found. I installed cocoa pods and also updated it. Anyone please suggest how to solve this issue.
VIVEK
  • 111
  • 2
  • 6
1 2 3
57
58