我想测试一些东西,并且想故意引起一个错误,所以这个委托函数被触发。
- (void) locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
// handle error
}有没有人有办法做到这一点呢?(关闭范围不起作用)。
发布于 2016-12-16 18:39:00
您可以尝试将CLLocationManager对象设置为nil,此方法将被激发。
注意:-这将停止更新位置,您的didupdatelocations方法也不会被调用。
https://stackoverflow.com/questions/41181838
复制相似问题