这是一个想法:
做这个:
[GKAchievement loadAchievementsWithCompletionHandler:^(NSArray *achievements, NSError *error) {
[GKAchievementDescription loadAchievementDescriptionsWithCompletionHandler:^(NSArray *descriptions, NSError *error)
{
for(GKAchievementDescription *myDescription in descriptions) {
for(GKAchievement *myAch in achievements) {
if ([myDescription.identifier isEqualToString:[myAch.identifier])
// the achievement is earned earned add it to array - do things - break;
}
}
}]; }];
这个想法是当你用loadAchievementsWithCompletionHandler
方法获得成就时,它只返回提交的成就。从那里您可以过滤所需的描述。