1

I was trying to make a sample iphone application to update current location. I have a function that logs the current location, "logCurrentLocation", but I have no idea how to call this function automatically in every X minutes( or seconds).

Please advise me which method I need to look at in the apple documentation.

Thank you for your help.

sung.

sungl
  • 1,155
  • 1
  • 7
  • 16

1 Answers1

2

Check out the documentation for NSTimer. It allows you to schedule a timer which will call a function (defined by a "Target" object and a "Selector" you want to call). You can change the interval at which the timer fires, and it should do the trick!

Ben Gotow
  • 14,805
  • 3
  • 42
  • 47