How to get city , state and Country name by Pincode in Swift iOS?
<p>I have Five textFields and I want to autofill Area,City ,State and Country when I enter the pin code number.</p>

<pre><code> import UIKit
 import CoreLocation

class CreateGroupView: UIViewController,UITextFieldDelegate,CLLocationManagerDelegate
{
   //View Did Load
  override func viewDidLoad() {
      super.viewDidLoad()

    let location: String = "305621"//"yourPINCode"
    let geocoder: CLGeocoder = CLGeocoder()
    geocoder.geocodeAddressString(location,completionHandler: {(placemarks: [CLPlacemark]?, error: NSError?) -&gt; Void in
        if ((placemarks?.count)! &gt; 0) {
            let placemark: CLPlacemark = (placemarks?[0])!
            let country : String = placemark.country!
            let state: String = placemark.administrativeArea!
            print(country)
            print(state)
        }
    } as! CLGeocodeCompletionHandler)
  }
}
</code></pre>

<p>How can I do that ?
Thanks</p>