Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

idelovski

macrumors regular
Original poster
Sep 11, 2008
235
0
I have one place in my app where screen should not get dimmed even if user does not touch things for a while.

I am turning this on in -viewDidAppear: and off in -viewWillDisappear: plus in -applicationWillTerminate: of application delegate. This is what I have in the delegate:

Code:
   if (app.isIdleTimerDisabled)
      app.idleTimerDisabled = NO;

What about other places? If my application goes to the background, is system handling this or I need to turn this off in -applicationDidEnterBackground: or -applicationWillResignActive:? Any other places?
 
In my App I set idleTimerDisabled when the GPS (Location Services) is switched on, and clear it when the GPS is switched off. This appears to be sufficient.

In other words, the system takes care of the Idle Timer when your App is not in the foreground.
 
Thanks,

I looked again at the documentation and it states that "You should set this property only if necessary and should be sure to reset it to NO when the need no longer exists."

I suppose it means that I should turn it off when my application doesn't need it any more and not when the device in general doesn't need it any more. I think I worry too much about these things.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.