Как я могу открыть таблицу лидеров игрового центра в tvOS? Я использовал этот код для своих игр для iPhone, 'leaderboardIdentifier' недоступен в tvOS.
Я планировал использовать ту же таблицу лидеров на AppleTV (это будет та же игра).
Большое спасибо за помощь, Стефан
@IBAction func handleGameCenter(sender: UIButton) {
let gcViewController = GKGameCenterViewController()
gcViewController.viewState = GKGameCenterViewControllerState.Leaderboards
gcViewController.leaderboardIdentifier = gamePrefix + "Leaderboard"
gcViewController.gameCenterDelegate = self
// Show leaderboard
self.presentViewController(gcViewController, animated: true, completion: nil)
}
func gameCenterViewControllerDidFinish(gameCenterViewController: GKGameCenterViewController) {
gameCenterViewController.dismissViewControllerAnimated(true, completion: nil)
}