Core Location region monitoring

前端 未结 5 1406
你的背包
你的背包 2020-12-24 04:28

Does anyone know any knowledge of using this:

- (void) startMonitoringForRegion:(CLRegion *)region desiredAccuracy:(CLLocationAccuracy)accuracy

I

相关标签:
5条回答
  • 2020-12-24 04:32

    I'd have to see where you setup your locationManager instance. But as @Mark Adams is trying to elude to, you need to set your current class as the delegate for locationManager so it knows which class to send messages back to. It is as simple as:

    locationManager.delegate = self;

    0 讨论(0)
  • 2020-12-24 04:35

    Well you can monitor multiple regions and simulate location in Xcode (from the panel above the debugger) to check whether it's working or not. I've tested and it works pretty smooth.

    0 讨论(0)
  • 2020-12-24 04:39

    The Answer is :

    - (void) startMonitoringForRegion:(CLRegion *)region desiredAccuracy:(CLLocationAccuracy)accuracy
    

    is deprecated in ios 6.o. Instead use `- (void) startMonitoringForRegion:(CLRegion *)region.

    Thanks, Abdul`

    0 讨论(0)
  • 2020-12-24 04:45

    You'll need to move rather a long way for the region-monitoring stuff to work. Its current granularity seems to be based on when it gets handed off from one cell tower to another—in my testing, I had to move a mile or more for it to register that I had definitively left a small region I'd set.

    0 讨论(0)
  • 2020-12-24 04:54

    The Accuracy is improved in ios 5.

    0 讨论(0)
提交回复
热议问题