如何使用图像而不是活动指示器? [英] How to use a image instead of activity indicator?

查看:128
本文介绍了如何使用图像而不是活动指示器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,当我点击刷新按钮时,会出现一个活动指示器。当tableView刷新时,它就会消失。我想使用图像而不是那个活动指示器,这样当我点击刷新图像时,ll会出现在整个屏幕上,当视图ll b刷新时,它会消失。我怎样才能做到这一点? thanx提前

in my app when i click on refresh button, an activity indicator appears. and when tableView is refreshed then it disappears. i want to use a image instead of that activity indicator in such a way that when i click on refresh that image ll come on the whole screen and when view ll b refreshed it ll disappear. how can i do that? thanx in advance

推荐答案

基本上你需要做的是在当前视图上添加一个封面视图。

Basically what you need to do is add a "cover page" view over your current view.

如果将alpha设置为约50%,这些通常效果最佳。

These usually work best if you set the alpha to about 50%.

点击按钮即可调用 addSubview:coverPage 在哪里使用正确的属性初始化coverPage。

Hitting the button you can call addSubview:coverPage where you init coverPage somewhere with the right attributes.

如果需要,封面页可以在必要时拥有自己的旋转器或标签。

If you want, cover page can have it's own spinners or labels if necessary.

刷新完成后,只需拨打 [coverPage removeFromSuperview] 即可解雇。

after your refresh completes, just call [coverPage removeFromSuperview] to dismiss.

这篇关于如何使用图像而不是活动指示器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆