【问题标题】:LocationManager and iBeacon: How to count the current number of monitoring regionsLocationManager 和 iBeacon:如何统计当前监控区域的数量
【发布时间】:2014-06-30 22:55:48
【问题描述】:

LocationManager 用于监控 iBeacon 区域。

方法:_locationManager.monitoredRegions.count 返回 2 但我得到一个错误:

Error Domain=kCLErrorDomain Code=5 "The operation couldn’t be completed. (kCLErrorDomain error 5.)"

好像监控超过20个区域时返回这个错误..

-(void)locationManager:(CLLocationManager *)manager monitoringDidFailForRegion:(CLRegion *)region withError:(NSError *)error

如何从位置管理器中删除区域

【问题讨论】:

    标签: ios cllocationmanager ibeacon


    【解决方案1】:

    致电[_locationManager stopMonitoringRegion:myRegion]; 删除区域:)

    [_locationManager monitoredRegions].count 用于计数(请记住,monitoredRegions 是一个集合,重复项会被过滤掉)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-13
      • 1970-01-01
      • 2014-06-16
      • 2015-08-20
      • 1970-01-01
      • 2014-10-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多