iOS Developer Library

Developer

GameKit Framework Reference GKChallengeEventHandlerDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

GKChallengeEventHandlerDelegate

You implement the GKChallengeEventHandlerDelegate delegate to control how challenges are displayed in your game. More...

Inheritance


Not Applicable

Conforms To


Import Statement


Not Applicable @import GameKit;

Availability


Available in iOS 6.0 and later.
Deprecated in iOS 7.0.
  • Called when the local player selects a challenge banner displayed by Game Kit.

    Declaration

    Objective-C

    - (void)localPlayerDidSelectChallenge:(GKChallenge *)challenge

    Parameters

    challenge

    The selected challenge.

    Import Statement

    Availability

    Available in iOS 6.0 and later.

    Deprecated in iOS 7.0.

  • Called when the local player receives a new challenge.

    Declaration

    Objective-C

    - (void)localPlayerDidReceiveChallenge:(GKChallenge *)challenge

    Parameters

    challenge

    The received challenge.

    Import Statement

    Availability

    Available in iOS 6.0 and later.

    Deprecated in iOS 7.0.

  • Called to determine whether a banner should be shown when the local player receives a challenge.

    Declaration

    Objective-C

    - (BOOL)shouldShowBannerForLocallyReceivedChallenge:(GKChallenge *)challenge

    Parameters

    challenge

    The received challenge.

    Return Value

    Your delegate should return YEStrue if it wants a banner to be displayed. Otherwise it should return NOfalse.

    Discussion

    If you do not implement this method, a banner is always shown.

    Import Statement

    Availability

    Available in iOS 6.0 and later.

    Deprecated in iOS 7.0.

  • Called when the local player completes a challenge.

    Declaration

    Objective-C

    - (void)localPlayerDidCompleteChallenge:(GKChallenge *)challenge

    Parameters

    challenge

    The completed challenge.

    Import Statement

    Availability

    Available in iOS 6.0 and later.

    Deprecated in iOS 7.0.

  • Called to determine whether a banner should be shown when the local player completes a challenge.

    Declaration

    Objective-C

    - (BOOL)shouldShowBannerForLocallyCompletedChallenge:(GKChallenge *)challenge

    Parameters

    challenge

    The completed challenge.

    Return Value

    Your delegate should return YEStrue if it wants a banner to be displayed. Otherwise it should return NOfalse.

    Discussion

    If you do not implement this method, a banner is always shown.

    Import Statement

    Availability

    Available in iOS 6.0 and later.

    Deprecated in iOS 7.0.

  • Called when a remote player completes a challenge issued by the local player.

    Declaration

    Objective-C

    - (void)remotePlayerDidCompleteChallenge:(GKChallenge *)challenge

    Parameters

    challenge

    The completed challenge.

    Import Statement

    Availability

    Available in iOS 6.0 and later.

    Deprecated in iOS 7.0.

  • Called to determine whether a banner should be shown when a remote player completes a challenge.

    Declaration

    Objective-C

    - (BOOL)shouldShowBannerForRemotelyCompletedChallenge:(GKChallenge *)challenge

    Parameters

    challenge

    The completed challenge.

    Return Value

    Your delegate should return YEStrue if it wants a banner to be displayed. Otherwise it should return NOfalse.

    Discussion

    If you do not implement this method, a banner is always shown.

    Import Statement

    Availability

    Available in iOS 6.0 and later.

    Deprecated in iOS 7.0.