iOS获取电量方法
ios簡單的方法:
[UIDevice currentDevice].batteryMonitoringEnabled = YES; double?deviceLevel = [UIDevice currentDevice].batteryLevel;?獲取當前剩余電量, 我們通常采用上述方法。這也是蘋果官方文檔提供的。
它返回的是0.00-1.00之間的浮點值。 另外, -1.00表示模擬器。
?
?
轉載于:https://www.cnblogs.com/zhujin/p/4015868.html
總結
- 上一篇: |洛谷|动态规划|P1164 小A点菜
- 下一篇: python接收前端post数据_pyt