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
8
votes
2 answers

Getting error compiling ReactiveCocoa

I just pod installed this Podfile for a new project: source 'https://github.com/CocoaPods/Specs.git' platform :ios, '7.0' def import_pods pod 'Mantle' pod 'LBBlurredImage' pod 'TSMessages' pod 'ReactiveCocoa' end target…
Ankit
  • 3,878
  • 5
  • 35
  • 51
8
votes
0 answers

What is the proper use of NSNotificationCenter with ReactiveCocoa 3 and Swift?

I am playing around the ReactiveCocoa 3 and Swift and I decided to do a simple toy app to test how would I design an app with ReactiveCocoa 3 that implements the MVVM pattern. The basic staff works pretty good but I am not sure what is the best way…
GuidoMB
  • 2,191
  • 3
  • 25
  • 40
8
votes
2 answers

How to implement a basic UITextField input + UIButton action scenario using ReactiveCocoa 3?

I'm a Swift and ReactiveCocoa noob at the same time. Using MVVM and Reactive Cocoa v3.0-beta.4 framework, I'd like to implement this setup, to learn the basics of the new RAC 3 framework. I have a text field and I want the text input to contain more…
aslı
  • 8,740
  • 10
  • 59
  • 80
8
votes
2 answers

What are examples of hot and cold signal in ReactiveCocoa?

In this answer How to make RACSignal to become hot?, @erikprice explains hot and cold signal A "hot signal" is a signal that sends values (and presumably does work) regardless of whether it has any subscribers. A "cold signal" is a signal that…
onmyway133
  • 45,645
  • 31
  • 257
  • 263
8
votes
3 answers

With ReactiveCocoa bind to inverse of BOOL

I would like to do the opposite of the following code: RAC(self.activityIndicator, hidden) = RACObserve(self.playButton, selected); When the play button is selected the activity indicator should be NOT hidden. What is the best way to do this using…
Onato
  • 9,916
  • 5
  • 46
  • 54
8
votes
1 answer

How to combine two async network calls with ReactiveCocoa

I have two network signals that I want to merge, but with some restrictions. Let us call the network signals A and B. A does use AFNetworking to look up a resource in the cache and return any response for that request immediately. B also considers…
Andreas Aarsland
  • 945
  • 2
  • 11
  • 27
8
votes
3 answers

Combine signals in ReactiveCocoa to a new one that fires when all change

I'm trying to learn ReactiveCocoa and I'm writing a simple Space Invaders clone, based on a Ray Wenderlich tutorial. Lately during the development, I faced an issue I can't resolve. Basically I've two signals: a tap gesture signal a timed sequence…
Giordano Scalzo
  • 6,312
  • 3
  • 31
  • 31
8
votes
1 answer

Reactive Cocoa - Convert certain signal values into error or completed

Perhaps I'm still struggling on the reactive learning curve but I am having a hard time figuring out how to bridge a non reactive class with the rest of my reactive code. I am using a category to extend the non-reactive class. The property is just…
mjn12
  • 1,853
  • 3
  • 19
  • 27
7
votes
1 answer

RxSwift right way

I'm trying to write a MVVM with RxSwift and comparing to what I was used to do in ReactiveCocoa for Objective-C it's been a little hard to write my service in the right way. An exemple is a Login service. With ReactiveCocoa (Objective-C) I code…
Antonio Junior
  • 469
  • 6
  • 13
7
votes
1 answer

How to bind Realm objects changes?

In my project im trying to work via MVVM, so in VM in .h file @property (nonatomic, strong) NSArray *cities; in .m file - (NSArray *)cities { return [[GPCity allObjects] valueForKey:@"name"]; } GPCity is a RLMObject subclass How…
Zaporozhchenko Oleksandr
  • 4,660
  • 3
  • 26
  • 48
7
votes
2 answers

Get Signal from tap on UIButton in Reactive Cocoa 4

How can I create a Signal from a tap on a UIButton? So far I tried to use target/action, but have come to think that there might be an easier way. In an article of Colin Eberhardt, it is stated that Signals are appropriate for UI actions. But when…
nburk
  • 22,409
  • 18
  • 87
  • 132
7
votes
2 answers

Alamofire 3.0 ReactiveCocoa Conversion

I'm having a lot trouble converting my old Alamofire 2.0 to 3.0 in ReactiveCocoa. I keep getting an unknown identifier error on my sendNext and sendCompleted calls. public final class Network: Networking { private let queue = dispatch_queue_create(…
Brady coye
  • 120
  • 4
7
votes
2 answers

ReactiveCocoa combine SignalProducers into one

I'm using ReactiveCocoa and I have several SignalProducers let center = NSNotificationCenter.defaultCenter() let signalProducer1 = center.rac_notification(name: notificationName1, object: nil) let signalProducer2 = center.rac_notification(name:…
bjornorri
  • 369
  • 1
  • 3
  • 11
7
votes
3 answers

UISearchResultsUpdating w/ ReactiveCocoa

I'm building a UISearchController in which users will type a username, and the application will fetch results from a web service. I want to throttle the requests to reduce network calls while the user is typing. Using ReactiveCocoa how would one go…
Kyle Decot
  • 20,715
  • 39
  • 142
  • 263
7
votes
2 answers

Can/How Should I replace my KVO stuff with RC3?

I'm trying to port an objc app which uses Facebook's KVOController, to Swift. I've been encouraged to look at RC3 as an alternate and more Swiftish approach. I've read some blogs and I'm encouraged to give this a try. But much of the docs and blogs…