Game Center Formatting Time

1.7k views Asked by At

What do you set the value to be for the scoreReporter to show up as a correct time in game center leader-board. What do you need to covert the seconds to show up properly in the leader-board. Any help would be greatly appreciated.

Here is the code I have:

GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:@"BestTime"] autorelease];
scoreReporter.value = TotalSeconds * 10;
1

There are 1 answers

3
Luis On

Seconds are fine if you have defined your leaderboard score format type to "Elapsed time - To the second". You just need

scoreReporter.value = TotalSeconds