I do not want the phone to sleep, so I use:
[ [ UIApplication sharedApplication ] setIdleTimerDisabled:YES ] ;
but I need the phone to saddle on my screen so as not to lose the battery. I already saw this question. How can I omit the view in the iPhone application? but you need more details.
I am trying something like this:
to set opaqueWindow as the front-most (with a 320 x 480 black image uploaded)
[opaqueWindow makeKeyAndVisible]
[ opaqueWindow setAlpha:1.00 ]
[ mainWindow setAlpha:0.10 ]
and try to return to the main window and set it to the foreground (selection control and some labels):
[ opaqueWindow setAlpha:0 ]
[mainWindow makeKeyAndVisible]
[ mainWindow setAlpha:1.00 ]
There can only be one key window in my application, right? therefore, when mainWindow becomes key, then opaqueWindow is not and vice versa. I create opaqueWindow and access mainWindow as follows:
opaqueWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen ] bounds]];
opaqueView = [[UIView alloc] init];
[opaqueWindow addSubview:opaqueView];
mainWindow = [ myApplication keyWindow ] ;
mainWindow, - , opaqueWindow .
iphone, Cocoa Touch iphone 3 .
.
!
Piesia
: , opaqueWindow mainWindow, opaqueWindow . mainWindow opaqueWindow . ! .