Skip to Content
Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch
book

Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch

by Kyle Richter
November 2011
Beginner content levelBeginner
238 pages
6h 19m
English
Apress
Content preview from Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch

Setting a Default Leaderboard

With the release of iOS 5.0 Apple has added just one method to Game Center leaderboards. You now have the ability to set a default leaderboard for the local user. If you set a default leaderboard you can omit setting a category for a leaderboard when submitting and it will default to the correct one. The following method will take an NSString identifier as an argument for the leaderboard that you would like to specify as the default for the local player.

[GKLeaderboard setDefaultLeaderboard:@"com.dragonforged.leaderboardToBeDefault"images  withCompletionHandler:^(NSError *error)       { NSLog(@"An error occurred when setting ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning ARKit for iPhone and iPad: Augmented Reality App Development for iOS

Beginning ARKit for iPhone and iPad: Augmented Reality App Development for iOS

Wallace Wang
iOS 4 in Action

iOS 4 in Action

Lin Harrington, Shannon Appelcline, Christopher R. Allen, Brandon Trebitowski
iOS 7 Development Recipes: A Problem-Solution Approach

iOS 7 Development Recipes: A Problem-Solution Approach

Joseph Hoffman, Hans-Eric Grönlund, Colin Francis, Shawn Grimes

Publisher Resources

ISBN: 9781430235279Purchase book