ios - How to display Game Center leaderboard from SKScene -
i going preface noting ton of other threads in here this, can not of methods listed work. furthermore few of them latest ios , swift.
anyway trying trigger function inside of view controller skscene in order show game center leaderboard. function have inside of uiviewcontroller
func gamecenterviewcontrollerdidfinish(gamecenterviewcontroller: gkgamecenterviewcontroller!) { gamecenterviewcontroller.dismissviewcontrolleranimated(true, completion: nil) } func showleader() { var vc = self.view?.window?.rootviewcontroller var gc = gkgamecenterviewcontroller() gc.gamecenterdelegate = self vc?.presentviewcontroller(gc, animated: true, completion: nil) }
i have tried acouple of methods access , trigger function have been having hardest time let alone accessing function skscene. reason looking function self.view doesn't work. how can this?
Comments
Post a Comment