Man*_*gan 5 iphone objective-c ios core-motion
我的代码是:
if ([CMPedometer isStepCountingAvailable]) {
self.pedometer = [[CMPedometer alloc] init];
}
else {
NSLog(@"Step counting is not available on this device!");
[SVProgressHUD showErrorWithStatus:@"Step counting is not available on this device!"];
}
Run Code Online (Sandbox Code Playgroud)
当我在iOS8及更高版本的设备上运行它时,它说:
此设备无法进行步数计数!
我怎样才能将其用于计步?
| 归档时间: |
|
| 查看次数: |
1745 次 |
| 最近记录: |