Contents

init(type:handler:)

Creates a bar button with a type and handler.

Declaration

init(type: CPBarButton.Type, handler: CPBarButtonHandler? = nil)

Parameters

  • type:

    The button type.

  • handler:

    The block that CarPlay invokes when the user taps the button.

Return Value

A bar button of the specified type.

See Also

Creating a CarPlay Bar Button