title: Detecting which UIAlertView was clicked
body: <p>i need to pop up alert when my application loaded... I called it didfinished launching..
  after clicking ok button need to show another alert message i use clickedButtonAtIndex...</p>
  
  <p>Now when I clicked the ok button its calling again and again.. the alertview..</p>
  
  <p>I need to call only once... what to do?</p>
  
  <pre><code>-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
  
      // Override point for customization after application launch.
  
      // Add the tab bar controller's view to the window and display.
      [window addSubview:tabBarController.view];
      [window makeKeyAndVisible];
      viewControllersList = [[NSMutableArray alloc] init];
  
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"Alow this app to use your GPS location"
      delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
      [alert show];
      [alert release];
  
  }
  
  - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
  
  
      if (buttonIndex==0) {
          NSLog(@"NO");
      }
      else    {
  
          NSLog(@"Yes");
          UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"Do you want's to receive Push messages."
          delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
          [alert show];
          [alert release];
      }
  
  }
  </code></pre>
  
  <p>@thanks in advance.</p>