title: ReactiveCocoa - Changing side effects into signals
body: <p>In my application I have a signal which triggers some asynchronous network activity via <code>flattenMap</code>. I want to display a loading indicator while the network activity is in progress.</p>
  
  <p>My current solution works just fine:</p>
  
  <pre><code>  [[[[self.signInButton
      rac_signalForControlEvents:UIControlEventTouchUpInside]
      doNext:^(id x) {
        // show the loading indicator as a side-effect
        self.loadingIndicator.hidden = NO;
      }]
      flattenMap:^id(id x) {
        return [self doSomethingAsync];
      }]
      subscribeNext:^(NSNumber *result) {
        // hide the indicator again
        self.loadingIndicator.hidden = YES;
        // do something with the results
      }];
  </code></pre>
  
  <p>This works, however I would like to change the above code so that the <code>hidden</code> property of the loading indicator can be set via a signal.</p>
  
  <p>Is this possible?</p>
  
  <p>Elsewhere in my app I have more complex requirements where the visibility of an element depends on a few different 'events', being able to compose these via signals would be much better.</p>