我正在嘗試將遊戲中心集成到我的應用程序中。我花了很多時間來解決這個問題,需要一些幫助。這是我到目前爲止:遊戲中心登錄Swift
func login() {
println("login called")
var localPlayer = GKLocalPlayer()
localPlayer.authenticateHandler = {(viewController: UIViewController!, error: NSError!) -> Void in
if viewController != nil {
println("VC True")
self.presentViewController(viewController, animated: true, completion: nil)
}else if GKLocalPlayer.localPlayer().authenticated{
//WHAT HERE?
}
}
}
我做了一個登錄函數,我在視圖中調用加載。
感謝您的幫助。
沒關係這個作品! – 2014-11-08 04:37:33
你有沒有得到https://github.com/DaRkD0G/Easy-Game-Center-Swift? – YannickSteph 2015-04-11 13:03:45
@YannickSteph上面的github鏈接不可用 – Rajesh 2018-01-17 12:18:15