presentFromRootViewController in SKScene (Problem)



While trying to have interstitial ads pop up at my GameOverScene, (which is an SKScene *.sks* with a .swift file that corresponds to the .sks file, I realized that I cannot use the code:


if interstitial.isReady {

     interstitial.present(fromRootViewController: self) Error -> *Cannot convert value of type ‘GameOverScene’ to expected argument type ‘UIViewController’*


Is there a way I can somehow have the ad pop up, although it is not in a ViewController? If I would, that would be a lifesaver.





Powered by WPeMatico

You may also like...

Comments are closed.