如何获取 UIDevice BatteryLevel 以 1% 或更精细的增量提供状态

发布于 2024-09-30 04:48:50 字数 67 浏览 1 评论 0原文

UIDevice BatteryLevel 返回的“默认”数据似乎以 5% 为增量。我怎样才能将其达到 1% 或更精细?

It seems the "default" data returned by UIDevice batteryLevel is in 5% increments. How do I get it to 1% or finer?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

可可 2024-10-07 04:48:50

UIKit 调用检索电池只能获得 0.0 到 1.0 之间的更好数字,步长为 0.05,这意味着 5% 的间隔。为了获得更精细的粒度,您可能必须越狱设备并设置类似 ,但您可能无法提交应用程序。以防万一,我发现了这篇帖子,您可能会感兴趣。

The UIKit calls to retrieve Battery can only get a number better 0.0 to 1.0 with 0.05 steps which means 5% intervals. In order to get it with finer granularity you might have to jail break the device and setup something like this but you might not be able to submit the app. Just in case, I came across this post, which might be of interest to you.

っ左 2024-10-07 04:48:50

如果你想为越狱设备进行开发,你可以看看这个示例

if you wanna develop for jailbroken devices, you can take a look at this example

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文