Reputation: 16780
My ActivityIndicator comes up at the right time but the user can still press the buttons on the view while processing is occurring. The reason I'm using ActivityIndicator is to prevent such usage. How do I make sure that during the animation of ActivityIndicator, no UI interaction is possible? Also, I would prefer that the current view is still displayed to the user(as in I wouldn't prefer having an opaque view of UIActivityIndicator-if that's possible-unless that's the only option)
Upvotes: 0
Views: 1947
Reputation: 21893
Check out DSActivityView. It's a one-shot singleton that puts up a modal activity view VERY easily.
Include it in a View Controller, and then before you fire a long-running background process, you go:
[DSBezelActivityView activityViewForView:self.view];
And then when you're done and want to retire it, you go:
[DSBezelActivityView removeViewAnimated:YES];
Lots of configuration options, including the ability to put custom messages in the activity view... It's a great little library that I use ALL the time.
Upvotes: 3
Reputation: 7283
ActivityIndicator's job is to like names says indicate that something goes on, and not to disable all interactions...You should be the one to do that...you could try with setting userInteractionEnabled property to NO.
When everything is finished set it back to YES
Upvotes: 2