konran
konran

Reputation: 588

what is good practice using UIAlertView with UIActivityIndicator

I've read a lot here about misusage of UIAlertView and the fact that Apple may reject an app where UIAlertView is overused.

In my app I'm writing I have to update data rarely via online request and recalculating internal data structures. While this is in effect and running in a second thread I don't want that the user touches the GUI and the app's current settings etc. So I decided to show an UIAlertView with UIActivityIndicator and a UIProgessView for some seconds which is dismissed automatically when background work is done.

Do you think that it is a reason against HIG rules? If so do you have suggestions for good practice on this kind of work flow?

Cheers, Konran

Upvotes: 0

Views: 1318

Answers (3)

hennes
hennes

Reputation: 9342

I have used an alert view with integrated activity indicator in a couple of apps and none of them was rejected from entering the AppStore. If you don't display any button inside the alert view the user won't even consider it as an alert view, so I don't see any problem with that.

Upvotes: 0

GendoIkari
GendoIkari

Reputation: 11914

I don't think an alertView should be used to stop a user from interacting with the screen. What you can easily do is add a "mask" on top of your content. Create a view; give a background color of .5 alpha black, and add it as a subview of your main view. This will dim everything else, and stop the user from interacting with it.

Upvotes: 0

TomSwift
TomSwift

Reputation: 39512

Instead of a UIAlertView, I'd use MBProgressHUD. It looks nicer and has a built in activity indicator. Apple uses a similar component in some of their apps.

https://github.com/matej/MBProgressHUD

Upvotes: 2

Related Questions