如何在iPhone应用程序中调暗视图? [英] How can I dim the view in an iPhone application?

查看:132
本文介绍了如何在iPhone应用程序中调暗视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过许多iPhone应用程式会在更新或下载某个事件时让活动指示器调暗萤幕,让使用者知道它很忙。我知道如何做活动指示器,但我如何去做调光?如果可以,请发布示例代码。

I've seen a lot of iPhone apps that will dim the screen with an activity indicator when it's updating or downloading something to let the user know it's busy. I know how to do the activity indicator but how do I go about doing the dimming? Please post example code if you can.

推荐答案

好,我这样做是太创建另一个视图,低。然后我添加这个视图作为一个子视图。

Ok, the way I did this was too create another view and set the opacity very low. Then I add this view as a subview.

这篇关于如何在iPhone应用程序中调暗视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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