I have this code:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:msg delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
The problem is this code crash before it shows the alert, I have tested it on lower iOS and it work but on iOS 6 it crash.
I found the answer. I coded:
instead of
it crash because the process might not be performed in the main thread.
Source from:
https://stackoverflow.com/a/12475858/1179680