Mac Developer Library

Developer

GameKit Framework Reference GKGameCenterControllerDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

GKGameCenterControllerDelegate

Inheritance


Not Applicable

Import Statement


Swift

import GameKit

Objective-C

@import GameKit;

Availability


Available in OS X v10.8 and later.

The GKGameCenterControllerDelegate protocol is implemented by delegates of the GKGameCenterViewController class. The delegate is called when the player dismisses the Game Center user interface.

  • Called when the player is done interacting with the view controller’s content. (required)

    Declaration

    Swift

    func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController!)

    Objective-C

    - (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)gameCenterViewController

    Parameters

    gameCenterViewController

    The view controller the player finished interacting with.

    Discussion

    Your delegate should dismiss the Game Center 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.9 and later.