Search code examples
xcodeswiftiad

Adding a view to a SpriteKit scene in Swift


I'm trying to add an iAd banner to a SpriteKit scene, but I found out that I can't do that without adding a view/subview to the SpriteKit scene. How can I do this?


Solution

  • You need to access the view of your SKScene:

    self.view?.addSubview(yourSubview)