<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPPanelButtonConfiguration/init(primaryAction:secondaryAction:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPPanelButtonConfiguration(im)initWithPrimaryAction:secondaryAction:"
  },
  "title" : "init(primaryAction:secondaryAction:)"
}
-->

# init(primaryAction:secondaryAction:)

Initializes the button configuration object with the specified buttons.

```
init(primaryAction: CPTextButton, secondaryAction: CPTextButton?)
```

## Parameters

`primaryAction`

The primary button for the panel. Use this button to specify the default or primary action someone
might want to perform. The initializer makes a copy of the provided button.

`secondaryAction`

The secondary button for the panel. Use this to specify an additional action someone might want
to perform. The initializer makes a copy of the provided button, if any.

## Return Value

An initialized panel button configuration object.

---

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)