0

i've read that with using mkreversegeocoder i can do a query every 60 seconds. my istance of mkreversegeogoder start after cllocation retrieve some info. What's the best way to do a 60 seconds query? a timer? or play with timestamp of my olddate? or some other stuff? thank's

zebra
  • 435
  • 2
  • 8
  • 20

2 Answers2

0

You can call a selector with reversegeocoder routine after an arbitrary delay interval using NSObject's

- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay
Vladimir
  • 170,431
  • 36
  • 387
  • 313
0

mhmmm i'm not shure i've understand how to use.... something like

- (void) onceGeocoding:(CLLocationManager *)manager didUpdateToLocation:(CLLocation  
*)newLocation
fromLocation:(CLLocation *)oldLocation  {
self.geoCoder = [[[MKReverseGeocoder alloc] initWithCoordinate:newLocation.coordinate] autorelease];
geoCoder.delegate = self;
[geoCoder start];
NSLog(@"myTimer started");
}

this is my selector and i call in my other istance method with

[self performSelector:@selector(onGeocoding:) withObject:nil afterDelay:60.0];

?

zebra
  • 435
  • 2
  • 8
  • 20