<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPMapPanel/delegate-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPMapPanel(py)delegate"
  },
  "title" : "delegate"
}
-->

# delegate

The app-specific object that the system notifies when it hides and shows the panel.

```
weak var delegate: (any CPMapPanel.Delegate)? { get set }
```

## Discussion

Specify a custom object that adopts the [`CPMapPanel.Delegate`](/documentation/CarPlay/CPMapPanel/Delegate-swift.protocol) protocol if you want to know when the map panel appears
or disappears from your CarPlay interface. The system maintains a weak reference to the object you provide, so keep a reference
to the object in your own code.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)