Mac Developer Library

Developer

GameKit Framework Reference GKLeaderboardViewControllerDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

GKLeaderboardViewControllerDelegate

Inheritance


Not Applicable

Import Statement


Swift

import GameKit

Objective-C

@import GameKit;

Availability


Available in OS X v10.8 and later.
Deprecated in OS X v10.10.

The GKLeaderboardViewControllerDelegate protocol is implemented by delegates of the GKLeaderboardViewController class. The delegate is called when the player dismisses the leaderboard.

  • Called when the leaderboard view is dismissed. (required)

    Declaration

    Swift

    func leaderboardViewControllerDidFinish(_ viewController: GKLeaderboardViewController!)

    Objective-C

    - (void)leaderboardViewControllerDidFinish:(GKLeaderboardViewController *)viewController

    Parameters

    viewController

    The leaderboard view controller that was dismissed by the player.

    Discussion

    Your delegate should dismiss the view controller. If your game paused any gameplay or other activities, it can restart those services in this method.

    Import Statement

    Objective-C

    @import GameKit;

    Swift

    import GameKit

    Availability

    Available in OS X v10.8 and later.

    Deprecated in OS X v10.10.