0

I'm trying to present a ViewController from within the GameScene. Since days, I'm searching for it in the internet (and there are many options) but nothing works!! I've tried to do it by navigation controller, by performsegue, by calling a method in gameviewcontroller etc. But every time there is an error!

If I'm performing a segue like here How to perform segue from within a SKScene? it says: "Attempt to present * on whose view is not in the window hierarchy. So I have searched for that problem but I couldn't figure it out too...

Thanks for any help!

Community
  • 1
  • 1
  • try my answer on this: http://stackoverflow.com/questions/23077624/show-gkgamecenterviewcontroller-in-skscene/23077802#23077802 , but instead of gameCenterController try to present your view controller – Ilario Mar 05 '15 at 14:58
  • Die you try presenting it modally? That works even when no navigation controller is around. – Hermann Klecker Mar 05 '15 at 16:11
  • You can't actually present a ViewController, a ViewController controls a View. A View is what you may present. If GameScene is what is being presented at the moment, it's because an SKView is presenting it. Check out this question: http://stackoverflow.com/questions/21920308/how-to-dismiss-skscene – Joaquin Llaneza Mar 05 '15 at 17:36

0 Answers0