title: Swift : How to save latitude and longitude to use in another swift file
body: <p>I have this code in ViewController to capture the current location from users:</p>
  
  <pre><code>@IBOutlet weak var userMapView: MKMapView!
  
  var locationManager = CLLocationManager()
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      locationManager = CLLocationManager()
      locationManager.delegate = self
      locationManager.desiredAccuracy = kCLLocationAccuracyBest
      locationManager.requestWhenInUseAuthorization()
      locationManager.startUpdatingLocation()
  
  }
  
  func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
  
      let location : CLLocationCoordinate2D = manager.location!.coordinate
  
      print(location.latitude)
  
      let latitudeDelta : CLLocationDegrees = 0.01
      let longitudeDelta : CLLocationDegrees = 0.01
  
      let span : MKCoordinateSpan = MKCoordinateSpanMake(latitudeDelta, longitudeDelta)
  
      let center : CLLocationCoordinate2D = CLLocationCoordinate2DMake(location.latitude, location.longitude)
  
      let region : MKCoordinateRegion = MKCoordinateRegionMake(center, span)
  
      self.userMapView.setRegion(region, animated: false)
  
      self.userMapView.removeAnnotations(userMapView.annotations)
  
      let userPinLocation : CLLocationCoordinate2D = CLLocationCoordinate2DMake(location.latitude, location.longitude)
  
      let pinAnnotation = MKPointAnnotation()
  
      pinAnnotation.coordinate = userPinLocation
  
      pinAnnotation.title = "Sua localização atual"
  
      self.userMapView.addAnnotation(pinAnnotation)
  
  }
  </code></pre>
  
  <p>I have another swift file with the Database Functions, and I need save the latitude and longitude for use in database</p>
  
  <p>How I store the latitude and longitude in variables to use outside the locationManager function?</p>