When showing the achievements dialog using GKAchievementViewController, this works as expected.
However, when showing the leaderboard dialog using GKLeaderboardViewController, I simply a grey screen and no Done button. Furthermore, it appears to be in the wrong orientation on an iPhone.
Here is the code:
this.leaderboardController.TimeScope = GKLeaderboardTimeScope.AllTime;
this.leaderboardController.Category = "myLeaderboardId";
this.leaderboardController.ModalPresentationStyle = UIModalPresentationStyle.FormSheet;
this.leaderboardController.DidFinish += (senderLeaderboard, eLeaderboard) =>
{
this.leaderboardController.DismissViewController(true, null);
};
viewController.PresentViewController(this.leaderboardController, false, null);
I am using the same view controller that I use for showing the achievements dialog from Game Center.
I cannot dismiss the leaderboard dialog because it does not even have a 'Done' button.