MapKit Changes for Swift
MapKit
Modified MKAnnotationView
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKAnnotationViewDragState [enum]
| Protocols | |
|---|---|
| From | Equatable, Hashable, RawRepresentable |
| To | -- |
Modified MKCircle
| Protocols | |
|---|---|
| From | AnyObject, MKAnnotation, MKOverlay, NSObjectProtocol |
| To | MKOverlay |
Modified MKCircleRenderer
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKCircleView
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKDirections
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKDirectionsRequest
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKDirectionsResponse
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKDistanceFormatter
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKDistanceFormatterUnits [enum]
| Protocols | |
|---|---|
| From | Equatable, Hashable, RawRepresentable |
| To | -- |
Modified MKDistanceFormatterUnitStyle [enum]
| Protocols | |
|---|---|
| From | Equatable, Hashable, RawRepresentable |
| To | -- |
Modified MKErrorCode [enum]
| Protocols | |
|---|---|
| From | Equatable, Hashable, RawRepresentable |
| To | -- |
Modified MKETAResponse
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKGeodesicPolyline
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKLocalSearch
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKLocalSearchRequest
| Protocols | |
|---|---|
| From | AnyObject, NSCopying |
| To | NSCopying |
Modified MKLocalSearchResponse
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKMapCamera
| Declaration | Protocols | |
|---|---|---|
| From | class MKMapCamera : NSObject, NSSecureCoding, NSCoding, NSCopying {
var centerCoordinate: CLLocationCoordinate2D
var heading: CLLocationDirection
var pitch: CGFloat
var altitude: CLLocationDistance
convenience init()
class func camera() -> Self
convenience init(lookingAtCenterCoordinate centerCoordinate: CLLocationCoordinate2D, fromEyeCoordinate eyeCoordinate: CLLocationCoordinate2D, eyeAltitude eyeAltitude: CLLocationDistance)
class func cameraLookingAtCenterCoordinate(_ centerCoordinate: CLLocationCoordinate2D, fromEyeCoordinate eyeCoordinate: CLLocationCoordinate2D, eyeAltitude eyeAltitude: CLLocationDistance) -> Self
convenience init(lookingAtCenterCoordinate centerCoordinate: CLLocationCoordinate2D, fromDistance distance: CLLocationDistance, pitch pitch: CGFloat, heading heading: CLLocationDirection)
class func cameraLookingAtCenterCoordinate(_ centerCoordinate: CLLocationCoordinate2D, fromDistance distance: CLLocationDistance, pitch pitch: CGFloat, heading heading: CLLocationDirection) -> Self
} | AnyObject, NSCoding, NSCopying, NSSecureCoding |
| To | class MKMapCamera : NSObject, NSSecureCoding, NSCopying {
var centerCoordinate: CLLocationCoordinate2D
var heading: CLLocationDirection
var pitch: CGFloat
var altitude: CLLocationDistance
convenience init()
class func camera() -> Self
convenience init(lookingAtCenterCoordinate centerCoordinate: CLLocationCoordinate2D, fromEyeCoordinate eyeCoordinate: CLLocationCoordinate2D, eyeAltitude eyeAltitude: CLLocationDistance)
class func cameraLookingAtCenterCoordinate(_ centerCoordinate: CLLocationCoordinate2D, fromEyeCoordinate eyeCoordinate: CLLocationCoordinate2D, eyeAltitude eyeAltitude: CLLocationDistance) -> Self
convenience init(lookingAtCenterCoordinate centerCoordinate: CLLocationCoordinate2D, fromDistance distance: CLLocationDistance, pitch pitch: CGFloat, heading heading: CLLocationDirection)
class func cameraLookingAtCenterCoordinate(_ centerCoordinate: CLLocationCoordinate2D, fromDistance distance: CLLocationDistance, pitch pitch: CGFloat, heading heading: CLLocationDirection) -> Self
} | NSCopying, NSSecureCoding |
Modified MKMapItem
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKMapSnapshot
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKMapSnapshotOptions
| Protocols | |
|---|---|
| From | AnyObject, NSCopying |
| To | NSCopying |
Modified MKMapSnapshotter
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKMapType [enum]
| Protocols | |
|---|---|
| From | Equatable, Hashable, RawRepresentable |
| To | -- |
Modified MKMapView
| Declaration | Protocols | |
|---|---|---|
| From | class MKMapView : UIView {
weak var delegate: MKMapViewDelegate?
var mapType: MKMapType
var region: MKCoordinateRegion
func setRegion(_ region: MKCoordinateRegion, animated animated: Bool)
var centerCoordinate: CLLocationCoordinate2D
func setCenterCoordinate(_ coordinate: CLLocationCoordinate2D, animated animated: Bool)
func regionThatFits(_ region: MKCoordinateRegion) -> MKCoordinateRegion
var visibleMapRect: MKMapRect
func setVisibleMapRect(_ mapRect: MKMapRect, animated animate: Bool)
func mapRectThatFits(_ mapRect: MKMapRect) -> MKMapRect
func _handleSelectionAtPoint(_ locationInView: CGPoint)
func setVisibleMapRect(_ mapRect: MKMapRect, edgePadding insets: UIEdgeInsets, animated animate: Bool)
func mapRectThatFits(_ mapRect: MKMapRect, edgePadding insets: UIEdgeInsets) -> MKMapRect
@NSCopying var camera: MKMapCamera
func setCamera(_ camera: MKMapCamera, animated animated: Bool)
func convertCoordinate(_ coordinate: CLLocationCoordinate2D, toPointToView view: UIView?) -> CGPoint
func convertPoint(_ point: CGPoint, toCoordinateFromView view: UIView?) -> CLLocationCoordinate2D
func convertRegion(_ region: MKCoordinateRegion, toRectToView view: UIView?) -> CGRect
func convertRect(_ rect: CGRect, toRegionFromView view: UIView?) -> MKCoordinateRegion
var zoomEnabled: Bool
var scrollEnabled: Bool
var rotateEnabled: Bool
var pitchEnabled: Bool
var showsCompass: Bool
var showsScale: Bool
var showsPointsOfInterest: Bool
var showsBuildings: Bool
var showsTraffic: Bool
var showsUserLocation: Bool
var userLocation: MKUserLocation { get }
var userTrackingMode: MKUserTrackingMode
func setUserTrackingMode(_ mode: MKUserTrackingMode, animated animated: Bool)
var userLocationVisible: Bool { get }
func addAnnotation(_ annotation: MKAnnotation)
func addAnnotations(_ annotations: [MKAnnotation])
func removeAnnotation(_ annotation: MKAnnotation)
func removeAnnotations(_ annotations: [MKAnnotation])
var annotations: [MKAnnotation] { get }
func annotationsInMapRect(_ mapRect: MKMapRect) -> Set<NSObject>
func viewForAnnotation(_ annotation: MKAnnotation) -> MKAnnotationView?
func dequeueReusableAnnotationViewWithIdentifier(_ identifier: String) -> MKAnnotationView?
func selectAnnotation(_ annotation: MKAnnotation, animated animated: Bool)
func deselectAnnotation(_ annotation: MKAnnotation?, animated animated: Bool)
var selectedAnnotations: [MKAnnotation]
var annotationVisibleRect: CGRect { get }
func showAnnotations(_ annotations: [MKAnnotation], animated animated: Bool)
}
extension MKMapView {
func addOverlay(_ overlay: MKOverlay, level level: MKOverlayLevel)
func addOverlays(_ overlays: [MKOverlay], level level: MKOverlayLevel)
func removeOverlay(_ overlay: MKOverlay)
func removeOverlays(_ overlays: [MKOverlay])
func insertOverlay(_ overlay: MKOverlay, atIndex index: Int, level level: MKOverlayLevel)
func insertOverlay(_ overlay: MKOverlay, aboveOverlay sibling: MKOverlay)
func insertOverlay(_ overlay: MKOverlay, belowOverlay sibling: MKOverlay)
func exchangeOverlay(_ overlay1: MKOverlay, withOverlay overlay2: MKOverlay)
var overlays: [MKOverlay] { get }
func overlaysInLevel(_ level: MKOverlayLevel) -> [MKOverlay]
func rendererForOverlay(_ overlay: MKOverlay) -> MKOverlayRenderer?
func viewForOverlay(_ overlay: MKOverlay) -> MKOverlayView
func addOverlay(_ overlay: MKOverlay)
func addOverlays(_ overlays: [MKOverlay])
func insertOverlay(_ overlay: MKOverlay, atIndex index: Int)
func exchangeOverlayAtIndex(_ index1: Int, withOverlayAtIndex index2: Int)
} | AnyObject, NSCoding |
| To | class MKMapView : UIView, NSCoding {
weak var delegate: MKMapViewDelegate?
var mapType: MKMapType
var region: MKCoordinateRegion
func setRegion(_ region: MKCoordinateRegion, animated animated: Bool)
var centerCoordinate: CLLocationCoordinate2D
func setCenterCoordinate(_ coordinate: CLLocationCoordinate2D, animated animated: Bool)
func regionThatFits(_ region: MKCoordinateRegion) -> MKCoordinateRegion
var visibleMapRect: MKMapRect
func setVisibleMapRect(_ mapRect: MKMapRect, animated animate: Bool)
func mapRectThatFits(_ mapRect: MKMapRect) -> MKMapRect
func _handleSelectionAtPoint(_ locationInView: CGPoint)
func setVisibleMapRect(_ mapRect: MKMapRect, edgePadding insets: UIEdgeInsets, animated animate: Bool)
func mapRectThatFits(_ mapRect: MKMapRect, edgePadding insets: UIEdgeInsets) -> MKMapRect
@NSCopying var camera: MKMapCamera
func setCamera(_ camera: MKMapCamera, animated animated: Bool)
func convertCoordinate(_ coordinate: CLLocationCoordinate2D, toPointToView view: UIView?) -> CGPoint
func convertPoint(_ point: CGPoint, toCoordinateFromView view: UIView?) -> CLLocationCoordinate2D
func convertRegion(_ region: MKCoordinateRegion, toRectToView view: UIView?) -> CGRect
func convertRect(_ rect: CGRect, toRegionFromView view: UIView?) -> MKCoordinateRegion
var zoomEnabled: Bool
var scrollEnabled: Bool
var rotateEnabled: Bool
var pitchEnabled: Bool
var showsCompass: Bool
var showsScale: Bool
var showsPointsOfInterest: Bool
var showsBuildings: Bool
var showsTraffic: Bool
var showsUserLocation: Bool
var userLocation: MKUserLocation { get }
var userTrackingMode: MKUserTrackingMode
func setUserTrackingMode(_ mode: MKUserTrackingMode, animated animated: Bool)
var userLocationVisible: Bool { get }
func addAnnotation(_ annotation: MKAnnotation)
func addAnnotations(_ annotations: [MKAnnotation])
func removeAnnotation(_ annotation: MKAnnotation)
func removeAnnotations(_ annotations: [MKAnnotation])
var annotations: [MKAnnotation] { get }
func annotationsInMapRect(_ mapRect: MKMapRect) -> Set<NSObject>
func viewForAnnotation(_ annotation: MKAnnotation) -> MKAnnotationView?
func dequeueReusableAnnotationViewWithIdentifier(_ identifier: String) -> MKAnnotationView?
func selectAnnotation(_ annotation: MKAnnotation, animated animated: Bool)
func deselectAnnotation(_ annotation: MKAnnotation?, animated animated: Bool)
var selectedAnnotations: [MKAnnotation]
var annotationVisibleRect: CGRect { get }
func showAnnotations(_ annotations: [MKAnnotation], animated animated: Bool)
}
extension MKMapView {
func addOverlay(_ overlay: MKOverlay, level level: MKOverlayLevel)
func addOverlays(_ overlays: [MKOverlay], level level: MKOverlayLevel)
func removeOverlay(_ overlay: MKOverlay)
func removeOverlays(_ overlays: [MKOverlay])
func insertOverlay(_ overlay: MKOverlay, atIndex index: Int, level level: MKOverlayLevel)
func insertOverlay(_ overlay: MKOverlay, aboveOverlay sibling: MKOverlay)
func insertOverlay(_ overlay: MKOverlay, belowOverlay sibling: MKOverlay)
func exchangeOverlay(_ overlay1: MKOverlay, withOverlay overlay2: MKOverlay)
var overlays: [MKOverlay] { get }
func overlaysInLevel(_ level: MKOverlayLevel) -> [MKOverlay]
func rendererForOverlay(_ overlay: MKOverlay) -> MKOverlayRenderer?
func viewForOverlay(_ overlay: MKOverlay) -> MKOverlayView
func addOverlay(_ overlay: MKOverlay)
func addOverlays(_ overlays: [MKOverlay])
func insertOverlay(_ overlay: MKOverlay, atIndex index: Int)
func exchangeOverlayAtIndex(_ index1: Int, withOverlayAtIndex index2: Int)
} | NSCoding |
Modified MKMultiPoint
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKOverlay
| Declaration | Protocols | |
|---|---|---|
| From | protocol MKOverlay : MKAnnotation, NSObjectProtocol {
var coordinate: CLLocationCoordinate2D { get }
var boundingMapRect: MKMapRect { get }
optional func intersectsMapRect(_ mapRect: MKMapRect) -> Bool
optional func canReplaceMapContent() -> Bool
} | MKAnnotation, NSObjectProtocol |
| To | protocol MKOverlay : MKAnnotation {
var coordinate: CLLocationCoordinate2D { get }
var boundingMapRect: MKMapRect { get }
optional func intersectsMapRect(_ mapRect: MKMapRect) -> Bool
optional func canReplaceMapContent() -> Bool
} | MKAnnotation |
Modified MKOverlayLevel [enum]
| Protocols | |
|---|---|
| From | Equatable, Hashable, RawRepresentable |
| To | -- |
Modified MKOverlayPathRenderer
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKOverlayPathView
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKOverlayRenderer
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKOverlayView
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKPinAnnotationColor [enum]
| Protocols | |
|---|---|
| From | Equatable, Hashable, RawRepresentable |
| To | -- |
Modified MKPinAnnotationView
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKPlacemark
| Protocols | |
|---|---|
| From | AnyObject, MKAnnotation, NSObjectProtocol |
| To | MKAnnotation |
Modified MKPointAnnotation
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKPolygon
| Protocols | |
|---|---|
| From | AnyObject, MKAnnotation, MKOverlay, NSObjectProtocol |
| To | MKOverlay |
Modified MKPolygonRenderer
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKPolygonView
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKPolyline
| Protocols | |
|---|---|
| From | AnyObject, MKAnnotation, MKOverlay, NSObjectProtocol |
| To | MKOverlay |
Modified MKPolylineRenderer
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKPolylineView
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKRoute
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKRouteStep
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKShape
| Protocols | |
|---|---|
| From | AnyObject, MKAnnotation, NSObjectProtocol |
| To | MKAnnotation |
Modified MKTileOverlay
| Declaration | Protocols | |
|---|---|---|
| From | class MKTileOverlay : NSObject, MKOverlay, MKAnnotation {
init(URLTemplate URLTemplate: String?)
var tileSize: CGSize
var geometryFlipped: Bool
var minimumZ: Int
var maximumZ: Int
var URLTemplate: String? { get }
var canReplaceMapContent: Bool
}
extension MKTileOverlay {
func URLForTilePath(_ path: MKTileOverlayPath) -> NSURL
func loadTileAtPath(_ path: MKTileOverlayPath, result result: (NSData?, NSError?) -> Void)
} | AnyObject, MKAnnotation, MKOverlay, NSObjectProtocol |
| To | class MKTileOverlay : NSObject, MKOverlay {
init(URLTemplate URLTemplate: String?)
var tileSize: CGSize
var geometryFlipped: Bool
var minimumZ: Int
var maximumZ: Int
var URLTemplate: String? { get }
var canReplaceMapContent: Bool
}
extension MKTileOverlay {
func URLForTilePath(_ path: MKTileOverlayPath) -> NSURL
func loadTileAtPath(_ path: MKTileOverlayPath, result result: (NSData?, NSError?) -> Void)
} | MKOverlay |
Modified MKTileOverlayRenderer
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKUserLocation
| Protocols | |
|---|---|
| From | AnyObject, MKAnnotation, NSObjectProtocol |
| To | MKAnnotation |
Modified MKUserTrackingBarButtonItem
| Protocols | |
|---|---|
| From | AnyObject |
| To | -- |
Modified MKUserTrackingMode [enum]
| Protocols | |
|---|---|
| From | Equatable, Hashable, RawRepresentable |
| To | -- |