<!--
{
  "availability" : [
    "iOS: 4.1.0 - 7.0.0",
    "iPadOS: 4.1.0 - 7.0.0",
    "macOS: 10.8.0 - 10.10.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKLeaderboardViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKLeaderboardViewController"
  },
  "title" : "GKLeaderboardViewController"
}
-->

# GKLeaderboardViewController

The `GKLeaderboardViewController` class provides a standard user interface that displays leaderboard scores to the player. If the [`GKGameCenterViewController`](/documentation/GameKit/GKGameCenterViewController) class is available, you should use it instead.

```
class GKLeaderboardViewController
```

## Overview> Important:
> Your game must initialize a local player before you can use any Game Center classes. If there is no initialized player, your game receives a ``doc://com.apple.gamekit/documentation/GameKit/GKError/Code/notAuthenticated`` error. For more information, see <doc://com.apple.gamekit/documentation/GameKit/authenticating-a-player>.

To show a leaderboard screen, initialize a new `GKLeaderboardViewController` object and set the delegate. Optionally, you can configure the view controller to display specific data to the player. Then, present the new view controller and wait for the delegate to be called. Once the delegate is called, dismiss the view controller.

On iOS, you present and dismiss the view controller from another view controller in your game, using the methods provided by the <doc://com.apple.documentation/documentation/UIKit/UIViewController> class. In macOS, you use the [`GKDialogController`](/documentation/GameKit/GKDialogController) class to present and dismiss the view controller.

Your game should pause other activities before presenting the leaderboard.

### Subclassing Notes

The `GKLeaderboardViewController` class is not intended to be subclassed.

## Topics

### Configuring the Leaderboard View Controller

[`category`](/documentation/GameKit/GKLeaderboardViewController/category)

The named leaderboard that is displayed by the view controller.

[`leaderboardDelegate`](/documentation/GameKit/GKLeaderboardViewController/leaderboardDelegate)

The view controller’s delegate.

[`timeScope`](/documentation/GameKit/GKLeaderboardViewController/timeScope)

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



---

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)