---
title: GKNotificationBanner
framework: gamekit
role: symbol
role_heading: Class
path: gamekit/gknotificationbanner
---

# GKNotificationBanner

A Game Center-style banner that displays a message to the local player.

## Declaration

```swift
class GKNotificationBanner
```

## Overview

Overview 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

- [show(withTitle:message:completionHandler:)](gamekit/gknotificationbanner/show(withtitle:message:completionhandler:).md)
- [show(withTitle:message:duration:completionHandler:)](gamekit/gknotificationbanner/show(withtitle:message:duration:completionhandler:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Deprecated classes

- [GKAchievementViewController](gamekit/gkachievementviewcontroller.md)
- [GKChallengeEventHandler](gamekit/gkchallengeeventhandler.md)
- [GKChallengesViewController](gamekit/gkchallengesviewcontroller.md)
- [GKChallenge](gamekit/gkchallenge.md)
- [GKScoreChallenge](gamekit/gkscorechallenge.md)
- [GKAchievementChallenge](gamekit/gkachievementchallenge.md)
- [GKCloudPlayer](gamekit/gkcloudplayer.md)
- [GKGameCenterViewController](gamekit/gkgamecenterviewcontroller.md)
- [GKGameSession](gamekit/gkgamesession.md)
- [GKGameSessionSharingViewController](gamekit/gkgamesessionsharingviewcontroller.md)
- [GKFriendRequestComposeViewController](gamekit/gkfriendrequestcomposeviewcontroller.md)
- [GKLeaderboardViewController](gamekit/gkleaderboardviewcontroller.md)
- [GKPeerPickerController](gamekit/gkpeerpickercontroller.md)
- [GKScore](gamekit/gkscore.md)
- [GKSession](gamekit/gksession.md)
