0
En essayant de faire le changement de textLabel à 12h toutes les 24 heures quelqu'un peut-il m'aider à configurer ce code?Changement de textLabel pour changer à un moment précis
Ceci est le code que j'utilise actuellement.
h fil
NSTimer *timer;
IBOutlet UILabel *textLabel;
fichier
m
(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];