关于UIActivityIndi​​catorView的问题

时间:2011-03-23 05:47:13

标签: objective-c

我知道有些应用程序具有此功能。当用户等待应用程序计算时,可以看到UIActivityIndi​​catorView,并且整个屏幕都覆盖着灰色的前景。此视图中的任何组件都无法触及。 有人知道怎么做这个功能吗?

谢谢!

2 个答案:

答案 0 :(得分:1)

您好 你可以做的事情当你使你的指标可见​​时,然后使视图的setUserInteractionEnabled属性为NO,当指标变为不可见时将属性设置为YES我认为这可以解决你的问题

[self.view setUserInteractionEnabled:NO];
[indicator startAnimating];

当指标(activityindicator)变为不可见时

[indicator stopAnimating];
[self.view setUserInteractionEnabled:YES];

答案 1 :(得分:0)

您可以在此页面中使用此代码:Activity Indicator by Matt Gallagher

相关问题