title: How to detect the current scene in Swift SpriteKit app
body: <p>In my SpriteKit app I've 3 different scenes and I want to set a specific settings for each scene.
  I mean I want set visible an AdBanner in MainPage and SomeInfoScene but not in GameScene. How can I do this?
  This is my code: </p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
  
      if let view = self.view as! SKView? {
  
          let mainPage = SKScene(fileNamed: "MainPage")!
          mainPage.name = "MainPage"
  
          let someInfoPage = SKScene(fileNamed: "SomeInfoScene")!
          someInfoPage.name = "SomeInfoScene"
  
          let gameScene = SKScene(fileNamed: "GameScene")!
          gameScene.name = "GameScene"
  
          view.presentScene(mainPage)
  
          if let currentScene = view.scene {
  
              if currentScene.name == mainPage.name {
  
                  print("MainPage")
                  adBannerView.isHidden = false
              }
              if currentScene.name == someInfoPage.name {
  
                  print("SomeInfoScene")
                  adBannerView.isHidden = false
              }
              if currentScene.name == gameScene.name {
  
                  print("GameScene")
                  adBannerView.isHidden = true
              }
          }
       }
    }
  </code></pre>