Мой таймер обратного отсчета не работает. Он начался с «99» на экране, и он просто остановился. Это совсем не движется.Таймер обратного отсчета не работает
В моем файле заголовка.
@interface FirstTabController : UIViewController {
NSTimer *myTimer;
}
@property (nonatomic, retain) NSTimer *myTimer;
В моей .m файл
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context {
myTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(countDown) userInfo:nil repeats:YES];
}
- (void)countDown {
int counterInt = 100;
int newTime = counterInt - 1;
lblCountdown.text = [NSString stringWithFormat:@"%d", newTime];
}
И я аннулирование 'MyTimer' в моем dealloc. Итак, может кто-нибудь сказать мне, что не так с моим кодом.
Спасибо .. я упустил это .. – sicKo