Is there any way to know when the user dismisses the Game Center view controller?

Scenario: User desires to view a previous score, so they tap, "View Scores," the Game Center view loads, they view their score, then they click "Done." Is there any way to launch a method when the "Done" is clicked.

I do not think that viewDidDissapear will work for this, because it is a remote view. What do you think?

Thanks.

有帮助吗?

解决方案

Set the GKLeaderboardViewController's leaderboard-delegate to self.

leaderboardController.leaderboardDelegate = self;

then use the method:

- (void)leaderboardViewControllerDidFinish:(GKLeaderboardViewController *)viewController {

}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top