Instance Property

leaderboardTimeScope

A time filter used to restrict which scores are displayed to the player.

Declaration

var leaderboardTimeScope: GKLeaderboard.TimeScope { get set }

Discussion

This property determines which tab view of the scores screen is displayed to the player. The default value is GKLeaderboard.TimeScope.allTime, which shows the best score each player has earned. For more information on time scopes, see GKLeaderboard.

When the leaderboard is presented, the value of this property determines the initial tab that is displayed to the player. As the player changes which tab they view, the leaderboardTimeScope property is automatically updated. For example, to preserve the player’s selections, you can read the leaderboardTimeScope property after the screen is dismissed, and set that value the next time you initialize the view controller.

See Also

Configuring the Game Center Controller’s Content

var viewState: GKGameCenterViewControllerState

The content displayed by the Game Center controller.

enum GKGameCenterViewControllerState

Possible values for the viewState property.

var leaderboardIdentifier: String?

The named leaderboard that is displayed by the view controller.

var leaderboardCategory: String?

The named leaderboard that is displayed by the view controller.

Deprecated