SKScene
presentViewController(_:animated:completion)
, UIViewController
. , , :
self.view?.window?.rootViewController?.presentViewController(alert, animated: true, completion: nil)
ps: , Attempt to present <UIAlertController: 0x7fc31eb32e50> on <Sample_Game.GameViewController: 0x7fc31bd9b4f0> which is already presenting
. - , , .
[ 11 2016 ]
, , rootViewController :
let vc = self.view?.window?.rootViewController
if vc.presentedViewController == nil {
vc.presentViewController(alert, animated: true, completion: nil)
}