title: Quit iOS Application Programmatically with UIAlertView
body: <p>I'm aborting my iOS Application by below methods</p>
  
  <pre><code>-(void)cancelSelected
  {
      UIAlertView * alert = [[UIAlertView alloc] initWithTitle:nil message:@"Are you sure you want to exit?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
  
      [alert show];
  
      alert = nil;
  }
  </code></pre>
  
  <p>Method 1 :</p>
  
  <pre><code>-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
  {
      if (buttonIndex)
          abort();
  }
  </code></pre>
  
  <p>Method 2 :</p>
  
  <pre><code>-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
  {
      if (buttonIndex)
          [NSException raise:@"Disagree terms and conditions." format:@"Quit, Cancel"];
  }
  </code></pre>
  
  <p>Shall I do this to quit my iOS Application programmatically?</p>
  
  <p>Will this <code>abort()</code> method leads to reject my app?</p>
  
  <p>Thanks!</p>