MapKit Changes for Swift
MapKit
Added MKLocalSearchCompleter
Added MKLocalSearchCompleterDelegate.completer(_: MKLocalSearchCompleter, didFailWithError: NSError)
Added MKLocalSearchCompletion
Modified MKLocalSearchRequest
| Declaration | |
|---|---|
| From | class MKLocalSearchRequest : NSObject, NSCopying {
var naturalLanguageQuery: String?
var region: MKCoordinateRegion
} |
| To | class MKLocalSearchRequest : NSObject, NSCopying {
var naturalLanguageQuery: String?
var region: MKCoordinateRegion
}
extension MKLocalSearchRequest {
init(completion completion: MKLocalSearchCompletion)
} |
Modified MKMapView
| Declaration | |
|---|---|
| From | 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)
} |
| 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 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)
} |