Skip to content

Instantly share code, notes, and snippets.

@jagbolanos
Created February 8, 2012 21:14
Show Gist options
  • Select an option

  • Save jagbolanos/1773938 to your computer and use it in GitHub Desktop.

Select an option

Save jagbolanos/1773938 to your computer and use it in GitHub Desktop.
Get Battery Level
+ (float_t) batteryLevel {
UIDevice *myDevice = [UIDevice currentDevice];
[myDevice setBatteryMonitoringEnabled:YES];
return [myDevice batteryLevel];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment