2012-09-10 3 views
0

이 방법을 사용하여 모든 업적 설명을로드하고 있습니다.GKAchievementDescription에서 이미지를로드 할 수 있습니까?

[GKAchievementDescription loadAchievementDescriptionsWithCompletionHandler: 
^(NSArray *descriptions, NSError *error) { 
    CCLOG(@"achivements loaded"); 
    if (error != nil) { 
     NSLog(@"Error %@", error); 

} else { 
    if (descriptions != nil){ 
     CCLOG(@"nb %i",descriptions.count); 
     for (GKAchievementDescription* a in descriptions) { 
      CCLOG(@"image %@ %@ %@", a.title, a.achievedDescription, a.image); 
      [achievementsDescDictionary setObject: a forKey: a.identifier]; 
     } 
    } else { 
     CCLOG(@"descriptions empty"); 
    } 
    } 
}]; 

나는 항상 a.image = null을 얻습니다.

감사합니다.

답변

1

사실 Game Center에서 이미지를로드 할 수 없습니다.

그냥 프로젝트로 성과 이미지를 추가하고 게임 센터에서 이미지를로드 할 수없는 경우 성과-이미지 "매핑을위한 PLIST 파일을 생성 한 후 것에 대해 GKAchievementHandler

- (void)notifyAchievementTitleAndImage:(NSString *)title andMessage:(NSString *)message withImage:(UIImage *)image 
0

으로이 방법을 사용 "? 이 기술을 다양한 유형의 블록을 정의하기 위해 3-in-row와 유사한 제 게임에 사용했습니다.

관련 문제