title: Swift: Init parameter is unresolved
body: <p>I'm trying to do something that seems straightforward, but I'm getting "use of unresolved identifier" instead of the variable I'm expecting.</p>
  
  <p>In one class I'm instantiating an object:</p>
  
  <pre><code>let sprite = Hero(view: view)
  </code></pre>
  
  <p>View is a valid variable, and I can <code>po</code> it in this class.</p>
  
  <p>In Hero, I have my init function setup as follows:</p>
  
  <pre><code>init(view: SKView) {
      ...
  }
  </code></pre>
  
  <p>But when I try to <code>po</code> view from this initializer, I get the "use of unresolved identifier" error. Any idea why?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Here's all my relevant code:</p>
  
  <p><em>GameScene.swift</em></p>
  
  <pre><code>import SpriteKit
  
  class GameScene: SKScene {
      override func didMoveToView(view: SKView) {
          let sprite = Hero(view: view)
          self.addChild(sprite)
      }
  }
  </code></pre>
  
  <p><em>Hero.swift</em></p>
  
  <pre><code>import SpriteKit
  
  class Hero: SKSpriteNode {
      init(view: SKView) {
  
          let texture = SKTexture(imageNamed:"Spaceship")
          let color = SKColor(white: 0, alpha: 0)
          let size = CGSizeMake(100, 100)
  
          super.init(texture:texture, color:color, size:size)
  
          self.xScale = 1.0
          self.yScale = 1.0
          self.position = CGPointMake((view.bounds.width / 2) - (size.width / 2), view.bounds.height - 200)
  
      }
  }
  </code></pre>
  
  <p>Everything about this code works, the spaceship will show up if I set the position to, let's say CGPointMake(200,200), only <code>view</code> is unresolved in Hero. I'm passing view so that Hero knows the bounds of the view it's being added to and can center itself.</p>