【问题标题】:How to produce an iphone app which calculates the battery status?如何制作一个计算电池状态的iphone应用程序?
【发布时间】:2010-04-09 07:30:17
【问题描述】:

如何制作一个计算电池状态的iphone应用程序?我需要使用特定的 API 吗?

有人有任何在线教程的链接吗?

【问题讨论】:

    标签: iphone power-management


    【解决方案1】:

    只需设置[UIDevice currentDevice].batteryMonitoringEnabled = YES。然后你可以使用-[UIDevice batteryState]-[UIDevice batteryLevel]

    【讨论】:

    • 别忘了给currentDevice打电话给batteryLevel
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-09-26
    • 2018-11-21
    • 2021-07-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多