<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKGameCenterViewController/init(leaderboardID:playerScope:timeScope:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKGameCenterViewController(im)initWithLeaderboardID:playerScope:timeScope:"
  },
  "title" : "init(leaderboardID:playerScope:timeScope:)"
}
-->

# init(leaderboardID:playerScope:timeScope:)

Creates a view controller that presents a leaderboard with data from the specified players and time period.

```
init(leaderboardID: String, playerScope: GKLeaderboard.PlayerScope, timeScope: GKLeaderboard.TimeScope)
```

## Parameters

`leaderboardID`

The identifier for the leaderboard to display.

`playerScope`

The type of players to display in the leaderboard.

`timeScope`

The time period for the data to display in a classic leaderboard.

    For recurring leaderboards, this method ignores the time scope parameter and displays the data for the current occurrence instead.

## Return Value

The initialized view controller.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)