title: How I can make transfer location data to another class?
body: <pre><code>import CoreLocation
  
  class LocationManager: NSObject {
  
      static let shared = LocationManager()
      
      private let locationManager = CLLocationManager()
      
      private override init() {
          
          super.init()
          
          locationManager.delegate = self
          
          locationManager.requestWhenInUseAuthorization()
          locationManager.desiredAccuracy = kCLLocationAccuracyBest
          
          if CLLocationManager.locationServicesEnabled(){
              locationManager.startUpdatingLocation()
          }
          
      }
      
  }
  extension LocationManager: CLLocationManagerDelegate {
      
      func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
          
          guard let locations = locations.first else { return }
          
          let latitude = locations.coordinate.latitude
          let longitude = locations.coordinate.longitude
  
          let geocoder = CLGeocoder()
          
          geocoder.reverseGeocodeLocation(locations) { placemarks, error in
              if (error != nil){
                  print(&quot;Error in reverseGeocode&quot;)
              }
              
              guard let placemark = placemarks else { return }
              
              if placemark.count &gt; 0 {
                  guard let placemark = placemark.first else { return }
                  
                  guard let city = placemark.locality else { return }
                  guard let country = placemark.country else { return }
                  
              }
          }
          
      }
      
      func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
          
          locationManager.stopUpdatingLocation()
          print(&quot;Error: \(error.localizedDescription)&quot;)
          
      }
      
  }
  </code></pre>
  <p>I have got data from location manager, and I would like transfer city, country, latitude, longitude data to another class, how I can make it?</p>