Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/118.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用什么来代替iOS 7中不推荐使用的regionMonitoringAvailable?_Ios_Ios7_Deprecated_Clregion - Fatal编程技术网

使用什么来代替iOS 7中不推荐使用的regionMonitoringAvailable?

使用什么来代替iOS 7中不推荐使用的regionMonitoringAvailable?,ios,ios7,deprecated,clregion,Ios,Ios7,Deprecated,Clregion,iOS 7中不推荐regionMonitoringAvailable。我们应该改为使用什么?CLLocationManager的头文件声明您现在应该使用[CLLocationManager isMonitoringAvailableForClass::: 确定设备是否支持对指定类型的区域进行监视。如果否,所有监视指定区域类型的尝试都将失败 您传入希望监视的CLRegion类。例如: [CLLocationManager isMonitoringAvailableForClass:[CLBeaco

iOS 7中不推荐regionMonitoringAvailable。我们应该改为使用什么?

CLLocationManager的头文件声明您现在应该使用
[CLLocationManager isMonitoringAvailableForClass::

确定设备是否支持对指定类型的区域进行监视。如果
,所有监视指定区域类型的尝试都将失败

您传入希望监视的
CLRegion
类。例如:

[CLLocationManager isMonitoringAvailableForClass:[CLBeaconRegion class]];
编辑:正如@anna在上面提到的,这一点也在本文中进行了讨论


苹果通常会发布关于不推荐方法替代方案的信息,但不幸的是,文档、标题和其他编程指南有时彼此不同步

看起来像
isMonitoringAvailableForClass:
。请参见《位置和地图编程指南》中的。