I want to make a “downloading” uilabel whose label text will change dynamically when I call the method “updating”:
self.checkingArray = [NSArray arrayWithObjects:@"download", @"download.", @"download..", @"download...",
nil];
- (void) updating
{
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(changeText) userInfo:nil repeats:YES];
}
- (void) changeText
{
checkLabel.text = [self.checkingArray objectAtIndex:curCheckingState];
self.curCheckingState++;
if (self.curCheckingState >= 4) {
self.curCheckingState = 0;
}
But the label text stay with the text “download…”, I want to know how to achieve my purpose?
Implement this: