Swiftpack.co -  Package - xattacker/MapScaleView_iOS_API
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
xattacker/MapScaleView_iOS_API
an iOS Map ScaleView UI Component
.package(url: "https://github.com/xattacker/MapScaleView_iOS_API.git", from: "1.1.0")

MapScaleView_iOS_API

an iOS swift Map ScaleView UI View component

Development Target: iOS 10

Provide a scale view with iOS MKMapView:
图片替换文本

Installation

Cocoapods

MapScaleView can be added to your project using CocoaPods 0.36 or later by adding the following line to your Podfile:

pod 'MapScaleView'

Swift Package Manager

To add MapScaleView to a Swift Package Manager based project, add:

.package(url: "https://github.com/xattacker/MapScaleView_iOS_API.git", .upToNextMajor(from: "1.1.0")),

to your Package.swift files dependencies array.

How to use:

import MapScaleView

let scale_view: UIMapScaleView

scale_view.setup(mapView) // initial 


// implement from MKMapViewDelegate
func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool)
{
   // udpate with mapView
   scaleView.setNeedsLayout()
}

GitHub

link
Stars: 5
Last commit: 12 hours ago

Release Notes

add property: unit
12 hours ago

new property unit: type MapScaleDistanceUnit

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco