|Nov 11, 2012, 12:10 PM||#1|
Best Way to Monitor Battery Level
I'm developing an iOS that for display reasons requires full screen, but I'd still like to have a battery indicator present on screen for the user.
One simple solution is to create a timer that updates the battery indicator on screen every X number of seconds such as:
[[UIDevice currentDevice] setBatteryMonitoringEnabled:true]; [NSTimer scheduledTimerWithTimeInterval:60 target:self selector:@selector(setBatteryIndicator) userInfo:nil repeats:YES];
Last edited by SandboxGeneral; Nov 11, 2012 at 12:35 PM. Reason: Added code tags
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Battery level in status bar different from istat/coconut battery||evolute8||MacBook Air||16||Aug 11, 2014 11:43 AM|
|Battery Level low resolution?||xArtx||iPhone/iPad Programming||6||Feb 20, 2013 06:54 PM|
|Battery Level Overlay for Games?||lightz39||Mac Applications and Mac App Store||1||Jan 11, 2013 11:38 AM|
|Wrong Battery % Level?||miragebg||iPhone||8||Jun 16, 2012 02:02 AM|
All times are GMT -5. The time now is 12:15 PM.