title: How do I check if the 'destructive' button was pressed (UIActionSheet - iPhone)?
body: <p>I'm trying to work out the line of code I need to use in order to determine if the 'destructive' button has been press in a UIActionSheet.</p>
  
  <p>I've had a look around and found the delegate method...</p>
  
  <pre><code> - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
  </code></pre>
  
  <p>.. and I've also managed to find <code>[myActionSheet destructiveButtonIndex]</code>, I'm just not sure how to put the two together. This is what I have tried so far with no success:</p>
  
  <pre><code>- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
  {
      if (buttonIndex == destructiveButtonIndex) 
      {
          // Do something...
      }
  }
  </code></pre>