title: Use of local variable "" before its declaration error
body: <p>I get the above error when setting up GPS in Xcode at the lines with "locationManager". Not sure what to do. - edit- I cleaned the file and the error's were fixed until I added the func locationManager line outside of the viewDidLoad and the errors are back on the locationManager lines.</p>
  
  <p>Code:</p>
  
  <pre><code>class ViewController: UIViewController, CLLocationManagerDelegate {
  
      // labels
  
      @IBOutlet var cityLabel: UILabel!
      @IBOutlet var tempratureLabel: UILabel!
      @IBOutlet var rainLabel: UILabel!
      @IBOutlet var windLabel: UILabel!
      @IBOutlet var humidityLabel: UILabel!
      @IBOutlet var backgroundColor: UIImageView!
      var locationManager = CLLocationManager()
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          // USER GPS IN LAT/LON
  
          locationManager.delegate = self
          locationManager.desiredAccuracy = kCLLocationAccuracyBest
          locationManager.requestWhenInUseAuthorization()
          locationManager.startUpdatingLocation()
  
          // api
          let client = APIClient(apiKey: "xxxxxxxxxxxxxxxxxxxxxxxx")
          client.units = .Auto
          client.getForecast(latitude: -75, longitude: -26) { (currentForcast, error) -&gt; Void in
              if let currentTemperature = currentForcast!.currently?.temperature {
                  self.tempratureLabel.text = String(currentTemperature)
                  let backgroundTemp = currentForcast!.currently?.temperature
                  //update background image per temp
                  if backgroundTemp &lt;= 9  {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-GREY.png")
                  } else if backgroundTemp &gt;= 10 &amp;&amp; backgroundTemp &lt;= 19 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-DARKPURP.png")
                  } else if backgroundTemp &gt;= 20 &amp;&amp; backgroundTemp &lt;= 29 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-DARKBLUE.png")
                  } else if backgroundTemp &gt;= 30 &amp;&amp; backgroundTemp &lt;= 39 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-DGREEN.png")
                  } else if backgroundTemp &gt;= 40 &amp;&amp; backgroundTemp &lt;= 49 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-MIDPURP.png")
                  } else if backgroundTemp &gt;= 50 &amp;&amp; backgroundTemp &lt;= 59 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-MIDBLUE.png")
                  } else if backgroundTemp &gt;= 60 &amp;&amp; backgroundTemp &lt;= 69 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-LIGHTPURP.png")
                  } else if backgroundTemp &gt;= 70 &amp;&amp; backgroundTemp &lt;= 75 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-LIGHTBLUE.png")
                  } else if backgroundTemp &gt;= 76 &amp;&amp; backgroundTemp &lt;= 78 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-LGREEN.png")
                  } else if backgroundTemp &gt;= 79 &amp;&amp; backgroundTemp &lt;= 81 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6_YELLOW.png")
                  } else if backgroundTemp &gt;= 82  &amp;&amp; backgroundTemp &lt;= 87 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6_ORANGE.png")
                  } else if backgroundTemp &gt;= 88  &amp;&amp; backgroundTemp &lt;= 98 {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-LIGHTRED.png")
                  } else {
                      self.backgroundColor.image = UIImage(named: "Gradient1_Iphone6-DARKRED.png")
                  }
              }
  
              //update minor labels
              let rain = 10
              self.rainLabel.text = String(rain) + " %"
              let humidity = 10
              self.humidityLabel.text = String(humidity) + " %"
              let wind = 10
              self.windLabel.text = String(wind) + " mph"
  
              // Do any additional setup after loading the view, typically
          }
  
          func locationManager (manager: CLLocationManager! , didUpdateLocation locations: [AnyObject]!) {
              print(locations)
          }
  
          func didReceiveMemoryWarning() {
              super.didReceiveMemoryWarning()
              // Dispose of any resources that can be recreated.
          }
      }
  }
  </code></pre>