我想制作一个“正在下载”的 uilabel,当我调用“更新”方法时,它的标签文本会动态变化:
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;
}
但是标签文字与文字“下载...”保持一致,我想知道如何达到我的目的?