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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -