I’m developing my first iPhone application. I have to update a label with the device speed every x seconds. I have created my own CLController and I can get device speed but I don’t know if I have got to use NSTimer to update my label. How can I do it?
I’m developing my first iPhone application. I have to update a label with the
Share
You can schedule the timer like this
Now below method will get called in every YOUR_INTERVAL (in seconds) periods
To stop the timer you could call invalidate on the timer object. So you might want to save the timer as a member variable, so that you can access it anywhere.