One Logo Pool Ball
CarPlay · IOS API REFERENCE

CPBarButton

class · iOS 12.0+ · SDK 27.1

class CPBarButton

Members (11)

init · iOS 14.0+

init

TypeScript
static initImageHandler(image: _UIKit_UIImage, handler?: (((arg0: CPBarButton) => void)) | null): CPBarButton
Swift declaration
init(image: UIImage, handler: CPBarButtonHandler? = nil)
init · iOS 14.0+

init

TypeScript
static initTitleHandler(title: string, handler?: (((arg0: CPBarButton) => void)) | null): CPBarButton
Swift declaration
init(title: String, handler: CPBarButtonHandler? = nil)
get · iOS 14.0+

buttonStyle

TypeScript
get buttonStyle(): CPBarButtonStyle
Swift declaration
var buttonStyle: CPBarButtonStyle { get set }
set · iOS 14.0+

buttonStyle

TypeScript
set buttonStyle(value: CPBarButtonStyle)
Swift declaration
var buttonStyle: CPBarButtonStyle { get set }
get · iOS 12.0+ · Deprecated in iOS 14.0

buttonType

TypeScript
get buttonType(): CPBarButton_Type
Swift declaration
var buttonType: CPBarButton.Type { get }
get · iOS 12.0+

isEnabled

TypeScript
get isEnabled(): boolean
Swift declaration
var isEnabled: Bool { get set }
set · iOS 12.0+

isEnabled

TypeScript
set isEnabled(value: boolean)
Swift declaration
var isEnabled: Bool { get set }
get · iOS 12.0+

image

TypeScript
get image(): (_UIKit_UIImage) | null
Swift declaration
var image: UIImage? { get set }
set · iOS 12.0+

image

TypeScript
set image(value: (_UIKit_UIImage) | null)
Swift declaration
var image: UIImage? { get set }
get · iOS 12.0+

title

TypeScript
get title(): (string) | null
Swift declaration
var title: String? { get set }
set · iOS 12.0+

title

TypeScript
set title(value: (string) | null)
Swift declaration
var title: String? { get set }

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

CPBarButton.init(type:handler:)

The iOS SDK compiler rejected this binding: cannot convert value of type 'CPBarButton.Type' to expected argument type 'CPBarButton.`Type`'

CPBarButton.init()

inherited init: cannot prove legal (class declares 3 custom initializers)

All CarPlay types →