草庐IT

regionMonitoringAvailable

全部标签

ios - 使用什么来代替 iOS 7 中弃用的 regionMonitoringAvailable?

regionMonitoringAvailable在iOS7中被弃用。我们应该使用什么来代替? 最佳答案 CLLocationManager的头文件声明您现在应该使用[CLLocationManagerisMonitoringAvailableForClass:]:Determineswhetherthedevicesupportsmonitoringforthespecifiedtypeofregion.IfNO,allattemptstomonitorthespecifiedtypeofregionwillfail.您传入要监视

ios - 使用什么来代替 iOS 7 中弃用的 regionMonitoringAvailable?

regionMonitoringAvailable在iOS7中被弃用。我们应该使用什么来代替? 最佳答案 CLLocationManager的头文件声明您现在应该使用[CLLocationManagerisMonitoringAvailableForClass:]:Determineswhetherthedevicesupportsmonitoringforthespecifiedtypeofregion.IfNO,allattemptstomonitorthespecifiedtypeofregionwillfail.您传入要监视