title: Could not cast Value of UIView to SCNView when trying to transition scenes
body: <p>Hey i have 2 scnscenes both set up the same way. The scene im in now is called 'Extra1' the scene im trying to get to is called GamePlay. with this code there are no errors but it crashes every time a try to call the function thats supposed to let me change view controllers. Both Views cast fine until i try to transition. the error is pointing to this code:</p>
  
  <pre><code>let scnView = self.view as! SCNView
  </code></pre>
  
  <p>This is the error:
  <a href="https://i.stack.imgur.com/FJmOl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FJmOl.png" alt="enter image description here"></a></p>
  
  <p>Code:</p>
  
  <pre><code>     import UIKit
       import GLKit
       import GameKit
       import SceneKit
       import StoreKit
       import SpriteKit
       import QuartzCore
       import Foundation
       import AVFoundation
       import AudioToolbox
       import GameController
  
       class Extra1: UIViewController, ADBannerViewDelegate, SKPhysicsContactDelegate,SKSceneDelegate, SCNSceneRendererDelegate, SCNPhysicsContactDelegate {
  
   override func viewDidLoad() {
      super.viewDidLoad()
  
      let scnView = self.view as! SCNView
  
      //scnView.delegate = self
      scnView.scene = FieldScene
      scnView.playing = true
      scnView.loops = true
      self.view.multipleTouchEnabled = true
      scnView.multipleTouchEnabled = true
      self.HUDView = GameScene(size: scnView.bounds.size)
      self.HUDView.delegate = self
      scnView.overlaySKScene = self.HUDView
      scnView.delegate = self
      scnView.overlaySKScene!.delegate = self
      scnView.overlaySKScene!.userInteractionEnabled = true
      scnView.backgroundColor = UIColor.clearColor()
      scnView.showsStatistics = false
  
      // Error happens when this function is called. If function isnt called the view call justs fine
        func MoveControls() {
  
      let storyboard = UIStoryboard(name: "Main", bundle: nil)
      let vc = storyboard.instantiateViewControllerWithIdentifier("GamePlay")
      self.presentViewController(vc, animated: true, completion:nil)
  
  
  }
  </code></pre>
  
  <p>Update for answer below:
  <a href="https://i.stack.imgur.com/luEod.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/luEod.png" alt="enter image description here"></a></p>