Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't see my alertView unless I comment out automatic dismission
    text
    copied!<p>I am implementing a simple alert view with activity indicator to show to the user while the app is performing the restore of the database. Everything is fine except that I can't see the alert view, unless I comment out the automatic dismiss line (last one here).</p> <p>Ok, the restore of the database is quite quick, but still I would expect to see it even if for an instant, no? I can see the screen get's a little darker during animation but that's all. I also tried putting a for loop to extend the time, the time extends but still no alert view.</p> <p>There is nothing wrong in the way the alert view is called, since if I comment the dismiss, I can see it...only forever. Anyone has an idea here? </p> <p><strong>Before anyone says it, I tried changing the delegate of the alertView to <code>self</code> as posted <a href="https://stackoverflow.com/questions/7872449/cant-set-uialertview-events">here</a>, but it didn't help.</strong></p> <pre><code>// First we prepare the activity indicator view to show progress indicator UIActivityIndicatorView * activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; [activityView setFrame:CGRectMake(121.0f, 50.0f, 37.0f, 37.0f)]; [activityView startAnimating]; // Then we put it in an alert view UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Loading" message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles:nil]; [alertView addSubview:activityView]; [alertView show]; // Finally we operate the restore [[SQLManager sharedSQL] restoreDatabase:[restoreDatabaseURL path]]; // And we can dismiss the alert view with the progress indicator [alertView dismissWithClickedButtonIndex:0 animated:NO]; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload