title: Custom UIAlertView with block callback
body: <p>MyAlertView (subclass of UIAlertView) has this method:</p>
  
  <pre><code>- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
      if (self.clickedButtonAtIndexBlock != NULL)
          self.clickedButtonAtIndexBlock(buttonIndex);
  }
  </code></pre>
  
  <p>My question is how do I define the callback when I create the alert view? Obviously this is wrong:</p>
  
  <pre><code>alert.clickedButtonAtIndexBlock = ^{
      NSLog(@"clicked: %d", buttonIndex);
  }
  </code></pre>