开发者

activity indicator in iOS should prevent user from access to other UI elements until it stops animating

My ActivityIndicator comes up at the right time but the user can开发者_JS百科 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)


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜