NSAlert doesn't work
- by Marco
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