creantan 发表于 2014-10-27 09:58:06

IOS8 获取当前电量信息

io_service_t powerSource = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPMPowerSource"));
CFNumberRef currentCapacityNum = (CFNumberRef)IORegistryEntryCreateCFProperty(powerSource, CFSTR(kIOPMPSCurrentCapacityKey), kCFAllocatorDefault, 0);

Dxer 发表于 2014-10-27 10:14:08

都转到移动平台了啊。为何我还在windows 平台挣扎。并连个样子都木有

cinesejin 发表于 2014-10-29 16:17:49

喊 。牛逼啊!!
页: [1]
查看完整版本: IOS8 获取当前电量信息