Latest 0.4.0
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit, CoreLocation, MapKit

Code Climate

A generic implementation of a common feature: searching and selecting a nearby location from an MKMapView.

screenshot-1   screenshot-2


This version uses Swift 3 and Cocoapods 0.1.0+. The final Swift 2 version is 0.2.5.

To run the example project, clone the repo, and run pod install from the Example directory first.

In addition to turning on the ‘Maps’ capability, you’ll need to add location-services to UIRequiredDeviceCapabilitiesand fill in NSLocationAlwaysUsageDescription in your Info.plist.

Other than that just set up the view controller and implement the delegate method:

// ...
let mapViewController = MapViewController(nibName: "MapViewController", bundle: MapViewController.bundle)
mapViewController.delegate = self
mapViewController.selectedMapItem = self.selectedMapItem // Optional.
// ...

func mapViewController(_ mapViewController: MapViewController, didSelectMapItem mapItem: MKMapItem) {
    self.selectedMapItem = mapItem // Save, submit, etc.
    mapViewController.dismissViewController(animated: true, completion: nil)

See example app for more details.


HLFMapViewController is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "HLFMapViewController"


HLFMapViewController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "HLFMapViewController",
    "version": "0.4.0",
    "summary": "Map modal for searching and selecting a location.",
    "description": "A generic implementation of a common feature: searchingnand selecting a nearby location from an MKMapView.",
    "screenshots": [
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Peng Wang": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.4.0"
    "social_media_url": "",
    "platforms": {
        "ios": "9.0"
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resources": "Pod/Assets/**/*",
    "frameworks": [
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This