Это мой код:
self.timer = [NSTimer scheduleTimerWithTimeInterval: 1 target: self selector: @selector (onTimer :) userInfo: nil повторяется: YES];
- (void) onTimer: (NSTimer *) таймер;{
timeInterval ++;
int hours = (int)timeInterval / 3600;
int minutes = (timeInterval %3600)/ 60;
int seconds = ((timeInterval%3600)%60);
NSString *timeDiff = [NSString stringWithFormat:@"%d:%02d:%02d", hours,minutes,seconds];
[NSThread detachNewThreadSelector:@selector(setText:) toTarget:self.time withObject:timeDiff];
}