Une erreur se produit lors du code dans mon application et la tâche est de rediriger vers URL après alerte. mais sur le code ce que je pense est correct ... et voici mon code vaUtilisation d'une erreur non déclarée: Erreur d'alerte dans ViewController.m --IOS Application
- (void) alertStatus:(NSString *)msg :(NSString *)title :(int)tag
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title
message:msg
delegate:self
cancelButtonTitle:@"Ok"
otherButtonTitles:nil, nil];
if (tag) alert.tag = tag;
{
[alertView show];
}
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if(alertView.tag == 101)
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://ABC.company.com"]];
//[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
}
}
l'erreur montre à la ligne si (tag) alert.tag = étiquette; (utilisation d'identificateur non déclaré: alerte)
Quelqu'un peut-il m'aider à sortir de ce problème.
ce qui est 'alert'? –
Modifier l'alerte pour alerteEfficher – akshay1188
Oui, vous avez raison. J'ai oublié cette chose idiote. abyway merci beaucoup .... - @ akshay1188 –