Re: Cancelling screensaver/sleep from an app
Re: Cancelling screensaver/sleep from an app
- Subject: Re: Cancelling screensaver/sleep from an app
- From: Ron Fleckner <email@hidden>
- Date: Mon, 4 Aug 2008 22:53:49 +1000
On 04/08/2008, at 10:23 PM, Allison Newman wrote:
Hi everyone,
In my current app, I have long periods where the user may not
interact with the app, but where the app display updates
continuously, and the user continues to watch the app (think
playing a movie, or something like that). How do I go about
disabling the screensaver/sleep mode whilst the app is being used
by the user?
Thanks in advance for any help.
Alli
Check the archives:<http://www.cocoabuilder.com/archive/message/cocoa/
2007/4/28/182595>
But don't bother now because all you'll find there is the following:
- (void)preventSleep
{
keepAwakeTimer = [[NSTimer scheduledTimerWithTimeInterval:30
target:self selector:@selector(stayAwake:) userInfo:nil
repeats: YES] retain];
}
- (void)stayAwake:(NSTimer *)sleepTimer
{
UpdateSystemActivity(OverallAct);// This is from Apple Tech Note
QA1160:Preventing Sleep
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden