dreamer_999
dreamer_999

Reputation: 1515

Display Time Elapsed Since Start of Game in Objective C

My goal is to display the time elapsed since the start of the game (this should be updated continuously).

I know how to find the time elapsed from the start until the end of the game. But I cannot figure out how to continuously update on the screen with the stopwatch.

Upvotes: 1

Views: 387

Answers (1)

grahaminn
grahaminn

Reputation: 1567

starting a timer with

self.updateTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(whatever you've called the method where you update the display to show current time) userInfo:nil repeats:YES];

will update your display ever second

Upvotes: 3

Related Questions