Reputation: 1236
I am having a label and an array which consists of 10 string values.I know how to display the text in that label.But now,For every 1 minutes I want to display each and every string from that array to the label .Any idea how to do this ?
Upvotes: 0
Views: 130
Reputation: 42163
NSTimer
with interval = 60 seconds to call this method repeatlyUpdate
Per your comments I guess what you want to update is the location info? Some references:
Upvotes: 2
Reputation: 434
use NSTimer with 60 sec interval, write a method to get the text from the array and display it in the label.
Upvotes: 1
Reputation: 7045
Use an NSTimer
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:60.0 target:self selector:@selector(changeText:) userInfo:nil repeats:YES];
Remember to use [timer invalidate]
if you want to stop the timer, or you'll have a crash if the target has been released.
Upvotes: 3