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.
Asked
Active
Viewed 1,883 times
2 Answers
7
They don't actually dim it, Apple won't allow apps to adjust the screen brightness. They just put a black, semitransparent image over the screen, which has a similar effect.
Edit:
Jailbroken applications can adjust the screen brightness, and there is an API to do it, however Apple will not approve of any application that changes the screen brightness.
-
To clarify, you should use a separate, semitransparent black view rather than altering the drawing of the main view(s). This will be composited cheaply in the GPU. – Jens Ayton May 27 '09 at 18:12
2
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.

Xcoder
- 1,041
- 5
- 17
- 29