Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道这是一个长镜头,但是有没有办法(以编程方式)在手机连接到充电器时阻止手机充电?
谢谢。
不会。您可以使用 UIDevice 上的几种方法来监控电池的状态,但从天文数字上讲,它不太可能有一个 API 来阻止充电。