【发布时间】:2014-12-15 07:21:05
【问题描述】:
我的代码是:
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!"];
}
当我在 iOS8 和更高版本的设备上运行它时,它会说:
此设备不支持计步功能!
如何使它可用于计步?
【问题讨论】:
-
您正在测试的设备是什么?
-
是否接受向用户显示这样的消息?我也计划在我的应用中实现同样的功能,只是想知道
标签: ios objective-c iphone core-motion