NSAlert doesn't work

Posted by Marco on Stack Overflow See other posts from Stack Overflow or by Marco
Published on 2010-03-15T08:03:53Z Indexed on 2010/03/15 8:09 UTC
Read the original article Hit count: 488

Filed under:
|

Hello i have implemented the following NSAlert:

NSString *title = [NSString stringWithFormat:@"Keine Internetverbindung"];
        NSString *alertMessage = [NSString stringWithFormat:@"Es konnte keine Verbindung zu www.sip.de aufgebaut werden!"];
        NSString *ok = [NSString stringWithFormat:@"Ok"];               

        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:alertMessage  delegate:self cancelButtonTitle:ok otherButtonTitles:nil];

        [alert show];
        [alert release];

and this is the delegate method to close the app:

- (void)alertView:(UIAlertView *)alertView didDisMissWithButtonIndex:(NSInteger)buttonIndex{
    exit(3);
}

But why the programm doesn't go into the method, what is my mistake?

greetings Marco

© Stack Overflow or respective owner

Related posts about uialertview

Related posts about iphone-sdk