Note that there are some explanatory texts on larger screens.

plurals
  1. POCheck if an instance of CLLocationManager isUpdatingLocation
    primarykey
    data
    text
    <p>I need to know if an instance of <code>CLLocationManager</code> (in this case called <code>gps</code>) is updating location calling the proper method</p> <pre><code>- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation </code></pre> <p>In my case the complete method is:</p> <pre><code>- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { //NSLog(@"didUpdateToLocation: %@", newLocation); currentLocation = newLocation; if (currentLocation != nil) { longitude.text = [NSString stringWithFormat:@"%.3f", currentLocation.coordinate.longitude]; latitude.text = [NSString stringWithFormat:@"%.3f", currentLocation.coordinate.latitude]; } address.text = NULL; [activityIndicator setHidden:NO]; [activityIndicator startAnimating]; NSLog(@"Resolving the Address"); [geocoder reverseGeocodeLocation:currentLocation completionHandler:^(NSArray *placemarks, NSError *error) { //NSLog(@"Found placemarks: %@, error: %@", placemarks, error); if (error == nil &amp;&amp; [placemarks count] &gt; 0) { placemark = [placemarks lastObject]; [address sizeToFit]; address.text = [NSString stringWithFormat:@"%@, %@\n%@ %@\n%@", [self sanitizedDescription:placemark.thoroughfare], [self sanitizedDescription:placemark.subThoroughfare], [self sanitizedDescription:placemark.postalCode], [self sanitizedDescription:placemark.locality], [self sanitizedDescription:placemark.country]]; if (address.text != NULL) { gpsTimer = [NSTimer scheduledTimerWithTimeInterval:10 target:gps selector:@selector(startUpdatingLocation) userInfo:nil repeats:NO]; [address sizeToFit]; [gps stopUpdatingLocation]; } } else { NSLog(@"%@", error.debugDescription); } } ]; } </code></pre> <p>How can I do?</p> <p>Thanks in advance :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload