I’m having a problem where all the UIAlertViews in my app take quite some time to show up. The display dims instantly but the actual alert needs like 5 seconds to be displayed.
I’m creating them like this:
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Title"
message:@"Message"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
[alertView release];
Anyone ever had this?
Thanks
–f
If you try to show UIAlertView NOT from main thread, you can see this type of delay (and, sometimes, more serious bugs and crashes).
Extract code as a separate method and call it using “performSelectorOnMainThread”, or use GCD and dispatch it there.