A UIAlertView
is displayed if an error occurs. But in the meantime the view on which the UIAlertView
were called has been dismissed (and therefore released). If the user clicks on OK the app crashes because a message to a released instance is sent. This will cause your app crashing:
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"test" message:@"test" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
[alertView release];
alertView = nil;
[self.navigationController popViewControllerAnimated:YES];
I thought the UIAlertView
is an independent unit. But it seems it isn't. Is there a way how I could avoid the app crashing (except not dismissing the view)?