2011-04-17 99 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