メソッド「updating」を呼び出すと、ラベルテキストが動的に変化する「ダウンロード」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;
}
しかし、ラベルのテキストは「ダウンロード...」というテキストのままです。目的を達成する方法を知りたいですか?