Kodeco Forums

ReactiveCocoa Tutorial – The Definitive Introduction: Part 1/2

Get to grips with ReactiveCocoa in this 2-part tutorial series. Put the paradigms to one-side, and understand the practical value with work-through examples.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/2493-reactivecocoa-tutorial-the-definitive-introduction-part-1-2

When do you have the plan to upgrade to RA4? Things have been changed alot :slightly_smiling:

check this out my RA4 with swift 2.2 from this tutorial

Is there a version of Swift ? :] I want to use this library in my project. it would be really nice if you convert to Swift.

Go along the blog.Helpful!!Thanks!

The dependency ‘ReactiveCocoa (=2.1.8)’ is not used in any concrete target.

I have installed RVM, ruby 2.3.0, gem, cocoapods 1.0.1, and setup the pod repos…
I cannot learn this article step by step, please help me solve this issue, thanks.

Use this Podfile:

platform :ios, ‘10.0’
target ‘RWReactivePlayground’ do
use_frameworks!
pod ‘ReactiveCocoa’, ‘~> 4.2.2’
end

How to understand the situation Signal of Signals using flattenMap?I konw use flattenMap transform signal data to block(value) ,but why called Signal of Signals?

What is the reason to wrap signInWithUsername:password:complete: method into RACSignal and then unwrap it using flattenMap and add side effects? This way is much simpler:

[[self.signInButton rac_signalForControlEvents:UIControlEventTouchUpInside]
     subscribeNext:^(__kindof UIControl * _Nullable x){
         self.signInButton.enabled = NO;
         self.signInFailureText.hidden = YES;
         
         [self.signInService
          signInWithUsername:self.usernameTextField.text
          password:self.passwordTextField.text
          complete:^(BOOL isSuccess) {
              self.signInFailureText.hidden = isSuccess;
              self.signInButton.enabled = YES;
              if (isSuccess)
                  [self performSegueWithIdentifier:@"signInSuccess" sender:self];
          }];
}];

agree, but this is a tutorials.

Hey guys, I made a swift3 version of the starter for this tutorial. Please feel free to check it out at https://github.com/BeckyWu220/Swift3-RWReactivePlayground3. Cheers!

Great tutorial. One little question:
self.signInButton.enabled = YES enables the “Sign In” button unconditionally. But username or password may be “invalid” (i.e. too short) at that time – and button must remain disabled, as managed by signUpActiveSignal. Is it a bug, and how would you resolve it in “reactive” manner?

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]