title: Why clickedButtonAtIndex method is call even tap on out side of UIActionSheet?
body: <p>As my title said that <code>clickedButtonAtIndex</code> delegate method is call even tap on out side of UIActionSheet.<br>
  My actionSheet is display when I tapped on <code>UIButton</code>.
  Code of my <code>UIActionSheet</code> declaration.</p>
  
  <pre><code>-(void)btnComplexityTapped:(UIButton *) sender
  {
      UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select your complexity" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Easy", @"Medium", @"High", nil];
      [actionSheet showFromRect:sender.frame inView:self.view animated:YES];
      [actionSheet release];
  }
  </code></pre>
  
  <p>And in delegate method</p>
  
  <pre><code>- (void)actionSheet:(UIActionSheet *)myActionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
  {
      if(buttonIndex == 0)
      {
          [self.btnComplexity setTitle:@"Easy" forState:UIControlStateNormal];
      }
      else if(buttonIndex == 1)
      {
          [self.btnComplexity setTitle:@"Medium" forState:UIControlStateNormal];
      }
      else
      {
          [self.btnComplexity setTitle:@"High" forState:UIControlStateNormal];
      }
  }
  </code></pre>
  
  <p>I know that this issue is fix by set last condition in delegate method to set <code>else if(buttonIndex == 1)</code> instead of only <code>else</code>. But I does not want to apply any fixing but I want to know <strong>why delegate method is called even I am not tapping on any button of <code>UIActionSheet</code></strong></p>
  
  <p>See this video for more clear picture.</p>
  
  <p><img src="https://i.stack.imgur.com/Mb3HP.gif" alt="enter image description here"></p>
  
  <p>As above video default title of button is "Medium" when I click on button then actionSheet is open and I click on out side of actionSheet (such like <code>self.view</code>) then delegate method <code>clickedButtonAtIndex</code> is called so last <code>else</code> condition is become true and thats way my button's title is changed "High". </p>
  
  <p>Can any body tell my why this is happening ? </p>