Completion Banners

In iOS 5.0, Apple added the capability to use an automatic message to let the user know that an achievement has been successfully earned. If supporting an iOS version that predates iOS 5, you will need to implement a custom system. There is no functional requirement to inform users that they have completed an achievement beyond providing a good user experience.

To automatically show achievement completion, set the showsCompletionBanner property to YES before submitting the achievement to Game Center, as shown in Figure 4.4. A good place to add this line of code is in the reportAchievement: withPercentageComplete: method.

achievement.showsCompletionBanner = YES;

Figure 4.4 A Game Center automatic ...

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.