Type Method

show(withTitle:message:duration:completionHandler:)

Displays a banner to the player for a specified period of time.

Declaration

class func show(withTitle title: String?, message: String?, duration: TimeInterval, completionHandler: (() -> Void)? = nil)

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. The completion handler is always called on the main thread.

See Also

Displaying a Notification Banner