An implementation of Apple's Map search view.
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate MapKit Search View into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'MapKitSearchView'
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate MapKit Search View into your Xcode project using Carthage, specify it in your Cartfile
:
github "philip-bui/mapkit-search-view"
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler. It is in early development, but MapKit Search View does support its use on supported platforms.
Once you have your Swift package set up, adding MapKit Search View as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/philip-bui/mapkit-search-view.git", from: "1.0.0"))
]
import MapKitSearchView
let mapKitSearch = MapKitSearchViewController(delegate: self)
mapKitSearch.tintColor = nil // Tints the close, userTracking and searchBar cursor colors.
mapKitSearch.markerTintColor = nil // Tints map annotations and mapItem results.
mapKitSearch.completionEnabled = true // Enables search completions as you type.
mapKitSearch.geocodeEnabled = true // Enables geocoding when tapping on a map at street levels.
mapKitSearch.userLocationRequest = .authorizedAlways // Requests location permission on view load.
MapKit Search View is available under the MIT license. See LICENSE for details.
link |
Stars: 16 |
Last commit: 1 week ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics