0
Я пытаюсь изменить textLabel в 12am каждые 24 часа, кто-нибудь поможет мне с настройкой этого кода?Изменение textLabel для изменения в определенное время
Это текущий код, который я использую.
ч фил
NSTimer *timer;
IBOutlet UILabel *textLabel;
м файл
(void)onTimer {
static int i = 0;
if (i == 0) { textLabel.text = @"iphone app"; }
else if (i == 1) { textLabel.text = @" Great App!"; }
else if (i == 2) { textLabel.text = @" WOW!"; }
else { textLabel.text = @" great application again!!"; i = -1; }
i++; }
timer =[NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(onTimer) userInfo:nil repeats:YES];