Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何获取当天的总步数 #1

Open
taojeff opened this issue Jun 22, 2016 · 2 comments
Open

如何获取当天的总步数 #1

taojeff opened this issue Jun 22, 2016 · 2 comments

Comments

@taojeff
Copy link

taojeff commented Jun 22, 2016

我在看完你的代码后我想问一下,那个开始和结束两个参数如何设置成当天到目前为止时间,同时下面的那个代理方法中的HKSampleQuery *smapleQuery = [[HKSampleQuery alloc]initWithSampleType:sampleType predicate:nil limit:0 sortDescriptors:@[start,end] resultsHandler:^(HKSampleQuery * _Nonnull query, NSArray<__kindof HKSample *> * _Nullable results, NSError * _Nullable error) 中的limit中我设置0的时候打印出来的值是全部的步数,我先取当天到目前时间为止的步数我limit该设置多少

@taojeff
Copy link
Author

taojeff commented Jun 22, 2016

还有就是我刚刚用计算机把自己的数据给统计了一个好像有很大的出入,后来我又跟健康数据对比一下真的有一部分数据有问题

@wlixcc
Copy link
Owner

wlixcc commented Jul 11, 2016

@taojeff 因为工作原因,很久都没有去接触HealthKit框架了,这个问题可能需要你自己研究一下了。很抱歉不能帮到你。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants