title: UIActionSheet, how to dismiss it with a single click?
body: <p>UIActionSheet, how to dismiss it with a single click?
  I have to click a button 2 times so it gets dismissed, what should I do to make it dismissble after the first click?! Here is my code:</p>
  
  <pre><code>-(void)buttonHeld:(id)sender
  {
  
  
  
      UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:@"Delete Contact?!" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles: nil];
  
      popupQuery.actionSheetStyle = UIActionSheetStyleBlackOpaque;
      [popupQuery showInView:self.view];
      [popupQuery release];
  
  
  
  
  }
  -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
  
  
    if (buttonIndex == 0) {
  
   NSLog(@"Delete button clicked Button Clicked");
  
  
      else if (buttonIndex == 1) {
  
     NSLog(@"Cancel Button Clicked");
     } 
  
  }
  </code></pre>