开发者

Game Center for iPad

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*)[开发者_Python百科UIApplication   sharedApplication].delegate).viewController;
  [rootVC presentModalViewController:leaderboardController animated:YES];
}

I have a iPhone app, it works fine with gamecenter. But when I build a iPad version, the gamecenter leaderboard still display with iPhone Size( 320x480 ).

So I added this:leaderboardController.modalPresentationStyle = UIModalPresentationFullScreen; but the display is corrupted, the 3 buttons( today, this week, all time ) on tabbar are NOT fullscreen. and a wood frame too.


you need to use the ModelPresentation Form Sheet which opens not in a full screen:

troller.modalPresentationStyle = UIModalPresentationFormSheet
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜