【发布时间】:2018-01-04 13:20:07
【问题描述】:
我正在使用 UIDeviceListener-master (https://github.com/eldade/UIDeviceListener) 类来获取 batteryCount、batterymaximumCapacity,但它的侦听器类永远不会被调用。
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(listenerDataUpdated:) name: kUIDeviceListenerNewDataNotification object:nil];
请为我提供在 iOS10 中获取电池详细信息的解决方案。
【问题讨论】:
标签: ios objective-c xcode uidevice