title: Xcode forgot password Parse
body: <pre><code>- (IBAction)forgotPassword:(id)sender {
      UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Direccion de Correo" message:@"Introduzca su correo electronico:" delegate:self cancelButtonTitle:@"Cancelar" otherButtonTitles:@"Aceptar", nil];
      alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
      [alertView show];
  
  
  }
  
  
  - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
  
      if(buttonIndex ==1){
          NSLog(@"ok button clicked in forgot password alert view");
          NSString *email=[alertView textFieldAtIndex:0].text;
          if ([email isEqualToString:@"email"]) {
              UIAlertView *display;
              display=[[UIAlertView alloc] initWithTitle:@"Email" message:@"Please enter password for resetting password" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles: nil];
              [display show];
  
          }else{
              [PFUser requestPasswordResetForEmailInBackground:email block:^(BOOL succeeded, NSError *error) {
                  UIAlertView *display;
                  if(succeeded){
                      display=[[UIAlertView alloc] initWithTitle:@"Correo electronico enviado" message:@"Por favor, revise su correo para resetear contraseña" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles: nil];
  
                  }else{
                       display=[[UIAlertView alloc] initWithTitle:@"Correo fallido" message:@"el correo electronico no coincide con ninguno en la base de datos" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles: nil];
                  }
                  [display show];
              }];
           }
      }
  }
  </code></pre>