Class

MKCompassButton

A specialized view that displays the current compass heading for its associated map.

Declaration

class MKCompassButton : UIView

Overview

Use this class when you want to incorporate a standard compass button into your own view hierarchy. A compass button reflects the current orientation of its associated map view. Tapping the compass button reorients the map so that due north is at the top of the map view.

Topics

Creating a Compass Button

init(mapView: MKMapView?)

Creates a compass button and associates it with the specified map view.

Getting the Compass Attributes

var mapView: MKMapView?

The map view that provides the heading information for the compass button.

var compassVisibility: MKFeatureVisibility

The visibility of the compass button.

enum MKFeatureVisibility

Constants indicating the visibility of different map features.

See Also

Map Customization

class MKMapCamera

A virtual camera for defining the appearance of the map.

class MKScaleView

A specialized view that displays the current scale information for its associated map.

protocol MKAnnotation

An interface for associating your content with a specific map location.

class MKUserTrackingButton

A specialized button that allows the user to toggle through the user tracking modes.

class MKUserTrackingBarButtonItem

A specialized bar button item that allows the user to toggle through the user tracking modes.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software