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
A:
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
2010-04-20 20:42:26
A:
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
2010-04-21 14:57:47