Posted By


ferlom on 10/08/13

Tagged


Statistics


Viewed 135 times
Favorited by 0 user(s)

Alertview confirmacion


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // Alertview botones confirmacion
  2.  
  3. UIAlertView *alerta = [[UIAlertView alloc]
  4. initWithTitle:@"Calificacion"
  5. message:@"Por favor, puede calificar nuestra aplicacion?"
  6. delegate:self
  7. cancelButtonTitle:[self noButtonTitle]
  8. otherButtonTitles:[ self yesButtonTitle], nil];
  9.  
  10.  
  11. [alerta setAlertViewStyle:UIAlertViewStyleDefault];
  12. [alerta show];
  13.  
  14.  
  15. // Metodo para saber que boton se ha pulsado
  16.  
  17.  
  18. -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
  19.  
  20. NSString *buttonTitle = [alertView buttonTitleAtIndex:buttonIndex];
  21.  
  22. if ([buttonTitle isEqualToString:[self yesButtonTitle]]) {
  23.  
  24. NSLog(@"El usuario ha presionado el boton SI!");
  25.  
  26.  
  27. } else if ([buttonTitle isEqualToString:[self noButtonTitle]]){
  28.  
  29. NSLog(@"El usuario ha presionado el boton NO");
  30. }
  31.  
  32.  
  33. }
  34.  

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.