Protocol

GKChallengeEventHandlerDelegate

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

Declaration

@protocol GKChallengeEventHandlerDelegate

Overview

By default, Game Kit briefly displays a banner over your game when any of the following events occur:

  • The local player receives a challenge.

  • The local player completes a challenge.

  • A remote player completes a challenge issued by the local player.

Your event handler can override or extend this behavior:

  • It can prevent a banner from being displayed.

  • It can be notified when a player taps in a banner.

  • It can handle the events directly.

Topics

Detecting When a User Taps a Banner

- localPlayerDidSelectChallenge:

Called when the local player selects a challenge banner displayed by Game Kit.

Responding When a New Challenge is Received

- localPlayerDidReceiveChallenge:

Called when the local player receives a new challenge.

- shouldShowBannerForLocallyReceivedChallenge:

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

Responding to Challenges Completed By the Local Player

- localPlayerDidCompleteChallenge:

Called when the local player completes a challenge.

- shouldShowBannerForLocallyCompletedChallenge:

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

Responding to Challenges Issued by the Local Player

- remotePlayerDidCompleteChallenge:

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

- shouldShowBannerForRemotelyCompletedChallenge:

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

Relationships

Inherits From

See Also

Challenge Events and View Controllers

GKChallengeEventHandler

The GKChallengeEventHandler class is used to respond to events related to challenges sent or received by the local player.

Deprecated