An iOS swift Map ScaleView UI View component

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 RadarView to a Swift Package Manager based project, add:

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

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)
{
   scaleView.setNeedsLayout()
}