GKNotificationBanner Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/GameKit.framework |
| Availability | Available in OS X v10.8 and later. |
| Companion guide | |
| Declared in | GKNotificationBanner.h |
Overview
The GKNotificationBanner class allows your game to display a notification banner that displays text to the player. The behavior of this banner is identical to other banners used by Game Kit.
Class Methods
showBannerWithTitle:message:completionHandler:
Displays a banner to the player.
Parameters
- title
The title of the banner.
- message
A secondary message to be displayed.
- completionHandler
A block to be called after the score is reported.
Discussion
When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls your completion handler. Keep in mind that the completion handler may be called on a thread other than the one originally used to invoke the method. This means that the code in your block needs to be thread-safe.
Availability
- Available in OS X v10.8 and later.
Declared In
GKNotificationBanner.hshowBannerWithTitle:message:duration:completionHandler:
Displays a banner to the player for a specified period of time.
Parameters
- title
The title of the banner.
- message
A secondary message to be displayed.
- duration
The amount of time that the banner should be displayed to the player.
- completionHandler
A block to be called after the score is reported.
Discussion
When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls your completion handler. Keep in mind that the completion handler may be called on a thread other than the one originally used to invoke the method. This means that the code in your block needs to be thread-safe.
Availability
- Available in OS X v10.8 and later.
Declared In
GKNotificationBanner.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)