Displaying Achievement Progress

Without being able to display the current progress of achievements to the user, they are next to useless. If required to present a custom interface for achievements, refer to the section “Going Further with Achievements.” The following method launches the combined Game Center View Controller that is new in iOS 6, as shown in Figure 4.3:

- (void)showAchievements{    [[GKGameCenterViewController sharedController] setDelegate:self];    [[GKGameCenterViewController sharedController] setViewState:GKGameCenterViewControllerStateAchievements];    [self presentViewController:[GKGameCenterViewController sharedController] animated:YES completion: nil];}

In the preceding method, used to launch ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.