2011-04-17 143 views
0
GKLeaderboardViewController *leaderboardController = [[[GKLeaderboardViewController alloc] init] autorelease]; 
if (leaderboardController != nil) { 
    // start the leader board view controller 
    leaderboardController.leaderboardDelegate = self; 
    leaderboardController.timeScope = GKLeaderboardTimeScopeAllTime; 
    leaderboardController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; 
    leaderboardController.modalPresentationStyle = UIModalPresentationFullScreen; 
    leaderboardController.category = @"map1"; 
    RootViewController* rootVC = ((AppDelegate*)[UIApplication sharedApplication].delegate).viewController; 
    [rootVC presentModalViewController:leaderboardController animated:YES]; 
} 

我有一個iPhone應用程序,它正常工作與GameCenter的。 但是,當我建立一個iPad版的GameCenter的排行榜還顯示:與iPhone尺寸(480)。遊戲中心爲iPad

所以我加了這一點:leaderboardController.modalPresentationStyle = UIModalPresentationFullScreen; 但顯示已損壞,3個按鈕(今天,本週,所有的時間)的TabBar不是全屏。 和木框架了。

+0

它不應該是一個子320x 480 GameCenter的。它應該是一個有點方形尋找GameCenter的.. =) – xuanweng 2011-04-18 04:30:31

+0

難道ü找到解決辦法? – 2012-01-19 12:48:01

回答

0

您需要使用的打開不是在一個全屏幕的ModelPresentation形式表:

troller.modalPresentationStyle = UIModalPresentationFormSheet