测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最新发布 | 2017年12月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Michal Ziman 维护。
简单易用的位置选择器。对用户来说如此,对开发者来说也是如此。
默认 | 历史记录 | 搜索 | 自定义 |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
要运行示例项目,请克隆仓库,并首先从 Example 目录运行 pod install
MZLocationPicker 通过 CocoaPods 提供。要安装它,只需在您的 Podfile 中添加以下行
pod "MZLocationPicker"
仅用于简单用法,只需实现 MZLocationPickerDelegate 方法并以如下方式显示选择器
let picker = MZLocationPickerController()
picker.delegate = self
present(picker, animated: true, completion: nil)
但是,您也可以对其进行更多自定义
let picker = MZLocationPickerController()
picker.delegate = self
picker.tintColor = .purple
picker.annotation.image = #imageLiteral(resourceName: "custom_pin")
picker.annotation.centerOffset = CGPoint(x: 0, y: 24)
picker.mapType = .satellite
picker.translator = self
present(picker, animated: true, completion: nil)
Michal Ziman, [email protected]
MZLocationPicker 的许可证为 MIT。有关更多信息,请参阅 LICENSE 文件。