title: Make UIView constantly fade in and out - completion:^{ possible infinite loop?
body: <p>I've written the following code to make my UIView constantly fade in and out. (FadeAlphaValue is a BOOL)... </p>
  
  <pre><code>-(void) fade {
      [UIView animateWithDuration:1.0
                       animations:^{
                           fadeView.alpha = (int)fadeAlphaValue;
                       }
                       completion:^(BOOL finished){
                           fadeAlphaValue=!fadeAlphaValue;
                           [self fade];
                       }];
  }
  </code></pre>
  
  <p>It works but I have a feeling it's going to cause some weird crash if I let it run forever... I'm not to familiar with <code>[..^{..} completion^{...}];</code> that notation. And I feel like since I'm calling the "fade" function during completion it won't actually complete until the "fade" function completes, the problem is the fade function will call itself again before it completes and so on and so on, it seems like an infinite loop... Is this going to cause some kind of weird multi-threading freeze after a few hundred iterations?</p>