Created
February 8, 2012 21:14
-
-
Save jagbolanos/1773938 to your computer and use it in GitHub Desktop.
Get Battery Level
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| + (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