开发者

ios pressure sensor API

开发者 https://www.devze.com 2023-04-02 15:57 出处:网络
In android we can use Sensor TYPE_PRESSURE to measure the atmospheric pressure. Is there any API that is available in iOS for the same purpose.开发者_JAVA百科 How can this be achieved in iOS?

In android we can use Sensor TYPE_PRESSURE to measure the atmospheric pressure.

Is there any API that is available in iOS for the same purpose.开发者_JAVA百科 How can this be achieved in iOS?

Any help appreciated


No, because no iOS device ships with a barometer. The best you could do would be find some site API that takes GPS co-ordinates and returns the current pressure at ground level there from normal weather observations.


iOS 8 introduces Core Motion Framework:

Core Motion provides two new classes (CMAltimeter and CMAltitudeData) which allow you to access the barometer on the iPhone 6 and iPhone 6 Plus.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号