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 best solutions below

3
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