---
title: compassVisibility
framework: mapkit
role: symbol
role_heading: Instance Property
path: mapkit/mkcompassbutton/compassvisibility
---

# compassVisibility

The visibility of the compass button.

## Declaration

```swift
var compassVisibility: MKFeatureVisibility { get set }
```

## Discussion

Discussion You can configure a compass button to be visible all the time or only when the compass heading changes.

## See Also

### Getting the compass attributes

- [mapView](mapkit/mkcompassbutton/mapview.md)
- [MKFeatureVisibility](mapkit/mkfeaturevisibility.md)
