0

我正在尝试使用 HKSampleQuery 通过 healthkit 商店获取心率读数,但我一直在获取 count/s。无论如何我可以通过计数/分钟得到它吗?

4

1 回答 1

2

Try using something like the following in the completion handler of a HKSampleQuery

let result = results?.last as HKQuantitySample
let quantity = result.quantity
let count = quantity.doubleValueForUnit(HKUnit(fromString: "count/min"))
于 2014-12-09T13:13:11.650 回答