GKNotificationBanner
A Game Center-style banner that displays a message to the local player.
Declaration
class GKNotificationBannerOverview
This class displays a message in a banner to the local player, similar to the banner that GameKit displays when a player earns an achievement. If the game is in the foreground, the banner appears immediately. If the game is in the background, the banner appears when the game becomes active.
To display the banner with your message, use the show(withTitle:message:completionHandler:) method. To specify a duration that GameKit presents the banner, use the show(withTitle:message:duration:completionHandler:) method instead. Optionally, pass these methods a completion handler that GameKit calls after it dismisses the banner.
GKNotificationBanner.show(withTitle:"Hooray",
message:"You passed level 1 and can move to level 2.",
completionHandler: nil)Topics
Displaying the Banner
See Also
Deprecated classes
GKAchievementViewControllerGKChallengeEventHandlerGKChallengesViewControllerGKChallengeGKScoreChallengeGKAchievementChallengeGKCloudPlayerGKGameCenterViewControllerGKGameSessionGKGameSessionSharingViewControllerGKFriendRequestComposeViewControllerGKLeaderboardViewControllerGKPeerPickerControllerGKScoreGKSession