I'm using UIAlertView with "please wait" and UIActivityIndicatorView. I show it using
{
...
[self performSelectorInBackground:@selector(sh) withObject:nil];
//i've tried also
//[NSThread detachNewThreadSelector:@selector(showWaiting) toTarget:self withObject:nil];
...
}
- (void)showWaiting {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[waitingAlert show];
[pool drain];
}
When alert appears, screen becomes darkened and inactive. And when time to dismiss alert comes I do
[waitingAlert dismissWithClickedButtonIndex:0 animated:NO];
After this alert disappears, but sometimes (chance is about 5%) screen remains as before darkened and inactive. Has someone faced such problem? Thanks!