2011-03-20 21 views

回答

0

遊戲中心得分提交實現你可以用它來處理錯誤或成功提交塊回調。這是直接從開發者文檔複製功能:

- (void) reportScore: (int64_t) score forCategory: (NSString*) category{ 
    GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:category] autorelease]; 
    scoreReporter.value = score; 

    [scoreReporter reportScoreWithCompletionHandler:^(NSError *error) { 
    if (error != nil){ 
     //There was an error submitting the score. 
    }else { 
     //The score was successfully submitted. 
    } 
    }]; 
} 

在用戶界面方面,如滑動體「歡迎回來」的觀點,你必須做出你自己的用戶界面。 (我只是用UIAlertview,但是這完全取決於你。)