I have an observer like this:
[mapView.userLocation addObserver:self forKeyPath:@"location" options:0 context:NULL];
So a method is called if an user changes his geolocation.
But I want that the method should also be called every x seconds, because If the user does not move, the location won’t change and so the method won’t be called. But I have to do some calculations.
How could I do that?
Thanks a lot in advance & Best Regards.
Use a timer
Later, if you want to cancel the timer, in the method myMethodToRun, you can invalidate