Dismiss more than one view controller simultaneously

后端 未结 9 850
一向
一向 2020-12-04 17:50

I\'m making a game using SpriteKit. I have 3 viewControllers: selecting level vc, game vc, and win vc. After the game is over, I want to show the win vc, then if I press OK

9条回答
  •  北海茫月
    2020-12-04 18:31

    You should be able to call:

    self.presentingViewController.dismissViewControllerAnimated(true, completion: {});
    

    (You may need to add ? or ! somewhere - I'm not a swift developer)

提交回复
热议问题