我正在尝试将游戏中心集成到我的应用程序中。我花了很多时间来解决这个问题,需要一些帮助。这是我到目前为止:游戏中心登录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