I using accelerometer in my app and i'm using [UIApplication sharedApplication].idleTimerDisabled = YES;
to prevent the device to sleep. It works fine, but this way the screen is always on full bright, there is a way to prevent the device to sleep and keep the energy economy mode on?
When idleTimerDisabled
is stetted to NO the device enter in the energy economy mode before sleep, i just want to prevent the device to sleep and keep the energy economy. There is a way to do that?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
There's a property of
UIScreen
instances,brightness
, that is likely what you want. Check out the documentation ofUIScreen
'sbrightness
property here.Try:
NOTE: As I was posting, DarkXphenomenon posted a link to an SO question whose asker gave the exact same solution. DarkXphenomenon is quick on the draw.