Skip to content

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

@taojeff

Description

@taojeff

我在看完你的代码后我想问一下,那个开始和结束两个参数如何设置成当天到目前为止时间,同时下面的那个代理方法中的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该设置多少

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions