ios - GKLeaderboardViewController has no 'Done' button and oriented incorrectly, but GKAchievementViewController shows fine -


when showing achievements dialog using gkachievementviewcontroller, works expected.

however, when showing leaderboard dialog using gkleaderboardviewcontroller, grey screen , no done button. furthermore, appears in wrong orientation on iphone.

here 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 using same view controller use showing achievements dialog game center.

i cannot dismiss leaderboard dialog because not have 'done' button.

okay, problem was initializing view controller in constructor of class. early, instead lazy-initialize (initialize if\when needed). fixed above mentioned problems.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -