How to dismiss SKScene?

后端 未结 6 1602
迷失自我
迷失自我 2020-12-09 17:30

When Im finished with my SKScene is there a way to dismiss the SKScene from within my SKScene class?

If not back in my Viewcontroller where I present my SKScene

6条回答
  •  长情又很酷
    2020-12-09 17:52

    "You can't go "Back to the View Controller" from a scene. The scene is a View, the view controller controls and displays views. Use the view controller to change views. Remember the view controller itself is not a view." -Wharbio

    Best solution here is to create another View Controller. This view controller will be my menu. Then the other viewcontroller will act as a host for the skscene.

    In my situation I then use my menu viewcontroller to dismiss the viewcontroller displaying in the skview.

提交回复
热议问题