How to get battery level with 1

后端 未结 5 1496
陌清茗
陌清茗 2020-12-17 17:17

How to get battery level with 1 % accuracy .

       [UIDevice currentDevice].batteryLevel

Will give battery level with accuracy of 5%. But

5条回答
  •  青春惊慌失措
    2020-12-17 17:49

    In iOS 8.1.x I have noticed that battery level is now reporting the exact battery level for apps now. Previously, UIDevice would report every 5%. There is nothing more for you to do in iOS 8.1.x as [UIDevice currentDevice].batteryLevel should report this automatically now.

提交回复
热议问题