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*)[UIApplication sharedApplication].delegate).viewController;
[rootVC presentModalViewController:leaderboardController animated:YES];
}
我有一个 iPhone 应用程序,它与游戏中心配合得很好。 但是当我构建 iPad 版本时,游戏中心排行榜仍然以 iPhone 尺寸( 320x480 )显示。
所以我添加了这个:leaderboardController.modalPresentationStyle = UIModalPresentationFullScreen;
但显示已损坏,标签栏上的 3 个按钮(今天、本周、所有时间)不是全屏的。 还有一个木框架。
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];
}
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用非全屏打开的 ModelPresentation 表单:
you need to use the ModelPresentation Form Sheet which opens not in a full screen: