ios - 健康套件 : how to determine original unit HKQuantitySample was stored in?

标签 ios objective-c healthkit

如果我正在访问用户的重量(或任何其他 HKQuantitySample),我如何确定用户最初存储重量的单位是什么?

最佳答案

HealthKit 不会暴露保存样本时使用的原始单位。但是,如果您想以用户喜欢的单位显示该类型 sample 的数量,我建议您查看documentation。对于preferredUnitsForQuantityTypes:completion: HKHealthStore上的方法.

关于ios - 健康套件 : how to determine original unit HKQuantitySample was stored in?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34097617/

相关文章:

ios - 如何强制 HKQuery 加载最近的步数?

ios - 查询 HealthKit 的相关性,但使用 anchor

ios - 请求 URL 太长(20K 个字符)IIS 7

objective-c - 应用程序重新打开时执行代码

ios - 如何动画滚动像 "pull to refresh"这样的 View ?

ios - objective c 从 url 请求中解析 json

ios - 如何将 HKStatisticsQuery 的结果返回到 Swift 2 中的变量?

ios - 旋转2个盒子相交

ios - 在 iOS 模拟器上通过 Xamarin.iOS 使用按需资源时出现问题

ios - 在 Navcontroller 中添加 Storyboard