From 42f4995e374bae23e9610ce6ff5ea19d14ca4e52 Mon Sep 17 00:00:00 2001 From: kevinzhow Date: Wed, 26 Aug 2015 09:45:55 +0800 Subject: [PATCH] Add more details --- .../PickLocation/PickLocationViewController.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Yep/ViewControllers/PickLocation/PickLocationViewController.swift b/Yep/ViewControllers/PickLocation/PickLocationViewController.swift index ecc4b1e2..ac34ed1a 100644 --- a/Yep/ViewControllers/PickLocation/PickLocationViewController.swift +++ b/Yep/ViewControllers/PickLocation/PickLocationViewController.swift @@ -122,6 +122,7 @@ class PickLocationViewController: UIViewController { } if let placemarks = placemarks as? [CLPlacemark] { + completion(placemarks) } else { @@ -305,12 +306,19 @@ extension PickLocationViewController: UITableViewDataSource, UITableViewDelegate let placemark = placemarks[indexPath.row] var text = "" + if let subLocality = placemark.subLocality { text += subLocality } + if let thoroughfare = placemark.thoroughfare { text += " " + thoroughfare } + + if let subThoroughfare = placemark.subThoroughfare { + text += " " + subThoroughfare + } + cell.locationLabel.text = text cell.checkImageView.hidden = true