diff --git a/Demo/LocationPickerDemo/Info.plist b/Demo/LocationPickerDemo/Info.plist index 7ec9418..b0cbfd1 100644 --- a/Demo/LocationPickerDemo/Info.plist +++ b/Demo/LocationPickerDemo/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.4.1 + 1.4.2 CFBundleSignature ???? CFBundleVersion diff --git a/LocationPicker.podspec b/LocationPicker.podspec index 2aae672..01e8974 100644 --- a/LocationPicker.podspec +++ b/LocationPicker.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'LocationPicker' - s.version = '1.4.1' + s.version = '1.4.2' s.author = { 'Almas Sapargali' => 'almassapargali@gmail.com' } s.homepage = 'https://github.com/almassapargali/LocationPicker' s.description = "LocationPickerViewController is a UIViewController subclass to let users choose locations by searching or selecting on map. It's designed to work as UIImagePickerController." diff --git a/LocationPicker/Info.plist b/LocationPicker/Info.plist index 07b3f7e..222de54 100644 --- a/LocationPicker/Info.plist +++ b/LocationPicker/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.4.1 + 1.4.2 CFBundleSignature ???? CFBundleVersion diff --git a/LocationPicker/LocationPickerViewController.swift b/LocationPicker/LocationPickerViewController.swift index 55e1dbd..6cbe07b 100644 --- a/LocationPicker/LocationPickerViewController.swift +++ b/LocationPicker/LocationPickerViewController.swift @@ -96,7 +96,7 @@ open class LocationPickerViewController: UIViewController { results.searchHistoryLabel = self.searchHistoryLabel return results }() - + lazy var searchController: UISearchController = { let search = UISearchController(searchResultsController: self.results) search.searchResultsUpdater = self @@ -118,8 +118,6 @@ open class LocationPickerViewController: UIViewController { searchTimer?.invalidate() localSearch?.cancel() geocoder.cancelGeocode() - // http://stackoverflow.com/questions/32675001/uisearchcontroller-warning-attempting-to-load-the-view-of-a-view-controller/ - let _ = searchController.view } open override func loadView() { @@ -166,6 +164,8 @@ open class LocationPickerViewController: UIViewController { navigationItem.searchController = searchController } else { navigationItem.titleView = searchBar + // http://stackoverflow.com/questions/32675001/uisearchcontroller-warning-attempting-to-load-the-view-of-a-view-controller/ + _ = searchController.view } definesPresentationContext = true diff --git a/README.md b/README.md index d042347..035ccd5 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,8 @@ locationPicker.location = initialLocation // button placed on right bottom corner locationPicker.showCurrentLocationButton = true // default: true -// default: navigation bar's `barTintColor` or `.whiteColor()` -locationPicker.currentLocationButtonBackground = .blueColor() +// default: navigation bar's `barTintColor` or `UIColor.white` +locationPicker.currentLocationButtonBackground = .blue // ignored if initial location is given, shows that location instead locationPicker.showCurrentLocationInitially = true // default: true