ios7 - 怎么优化ios代码,能达到省电的作用?
PHPz
PHPz 2017-04-17 17:32:04
0
2
347

1.APP 现在比较耗电,代码中比较耗电的部分主要是GPS 定位以及蓝牙通信、socket 通信
2.如何优化代码达到节省电能的目的

PHPz
PHPz

学习是最好的投资!

reply all(2)
PHPzhong

When optimizing battery power, when calling hardware devices, such as GPS positioning, it should be processed according to the usage scenario. If it is only positioned once, it should be turned off after use. If positioning is needed all the time, you need to pay attention to the frequency of calls. The same is true for network and Bluetooth. .

I don’t know anything about the code that can directly achieve the effect of saving power. It may be a good way to minimize memory overhead and CPU usage.

Ty80

1. Try not to leave the sensor on all the time, unless the program requires it, such as GPS; turn it off after use;
2. XCODE also provides an analysis tool for analyzing power consumption, you can use this tool to check.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template