Mac Developer Library

Developer

GameKit Framework Reference GKAchievementViewControllerDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

GKAchievementViewControllerDelegate

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.

An object implementing the GKAchievementViewControllerDelegate protocol is called when the user dismisses the achievements view controller. Typically, this protocol is implemented by the object in your game that originally displayed the achievements user interface.

  • Called when the user dismisses the achievements user interface. (required)

    Declaration

    Swift

    func achievementViewControllerDidFinish(_ viewController: GKAchievementViewController!)

    Objective-C

    - (void)achievementViewControllerDidFinish:(GKAchievementViewController *)viewController

    Parameters

    viewController

    The achievement view controller whose interface 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.