title: What I am doing wrong with my CLLocation?
body: <p>I am trying to make a simple app that shows:
  Latitude
  Longitude
  Horizontal Accuracy
  Altitude
  Vertical Accuracy
  Location From Start</p>
  
  <p>My code is:</p>
  
  <pre><code>@IBOutlet weak var latitude: UILabel!
  @IBOutlet weak var longitude: UILabel!
  @IBOutlet weak var horizontalAccuracy: UILabel!
  @IBOutlet weak var altitude: UILabel!
  @IBOutlet weak var verticalAccuracy: UILabel!
  @IBOutlet weak var distance: UILabel!
  
  var locationManager: CLLocationManager = CLLocationManager()
  var startLocation: CLLocation!
  
  @IBAction func resetDistance(sender: AnyObject) {
      startLocation = nil
  }
  
  func locationManager(manager: CLLocationManager!,
      didUpdateLocations locations: [AnyObject]!)
  {
      var latestLocation: AnyObject = locations[locations.count - 1]
  
      latitude.text = String(format: "%.4f",
          latestLocation.coordinate.latitude)
      longitude.text = String(format: "%.4f",
          latestLocation.coordinate.longitude)
      horizontalAccuracy.text = String(format: "%.4f",
          latestLocation.horizontalAccuracy)
      altitude.text = String(format: "%.4f",
          latestLocation.altitude)
      verticalAccuracy.text = String(format: "%.4f",
          latestLocation.verticalAccuracy)
  
  
      if startLocation == nil {
          startLocation = latestLocation as! CLLocation
      }
  
      var distanceBetween: CLLocationDistance =
      latestLocation.distanceFromLocation(startLocation)
  
      distance.text = String(format: "%.2f", distanceBetween)
  } 
  
  
  func locationManager(manager: CLLocationManager!,
      didFailWithError error: NSError!) {
  
  }
  </code></pre>
  
  <p>And then in the ViewDidLoad section:</p>
  
  <pre><code>locationManager.desiredAccuracy = kCLLocationAccuracyBest
      locationManager.delegate = self
      locationManager.requestWhenInUseAuthorization()
      locationManager.startUpdatingLocation()
      startLocation = nil
  </code></pre>
  
  <p>I keep getting the error: on the latitude.text line (everything hooked up correctly)</p>
  
  <pre><code>fatal error: unexpectedly found nil while unwrapping an Optional value
  </code></pre>
  
  <p>(lldb) </p>
  
  <p>How would I go about adding <strong>if let</strong> statements? Can you help me find the problem?</p>
  
  <p>Thanks!</p>