One Logo Pool Ball
CarPlay · IOS API REFERENCE

CPAlertAction

class · iOS 12.0+ · SDK 27.1

class CPAlertAction

Members (6)

init · iOS 16.0+

init

TypeScript
static initTitleColorHandler(title: string, color: _UIKit_UIColor, handler: ((arg0: CPAlertAction) => void)): CPAlertAction
Swift declaration
init(title: String, color: UIColor, handler: @escaping CPAlertActionHandler)
init · iOS 12.0+

init

TypeScript
static initTitleStyleHandler(title: string, style: CPAlertAction_Style, handler: ((arg0: CPAlertAction) => void)): CPAlertAction
Swift declaration
init(title: String, style: CPAlertAction.Style, handler: @escaping CPAlertActionHandler)
get · iOS 16.0+

color

TypeScript
get color(): (_UIKit_UIColor) | null
Swift declaration
@NSCopying var color: UIColor? { get }
get · iOS 12.0+

handler

TypeScript
get handler(): ((arg0: CPAlertAction) => Promise<void>)
Swift declaration
var handler: CPAlertActionHandler { get }
get · iOS 12.0+

style

TypeScript
get style(): CPAlertAction_Style
Swift declaration
var style: CPAlertAction.Style { get }
get · iOS 12.0+

title

TypeScript
get title(): string
Swift declaration
var title: String { get }

Skipped declarations

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

CPAlertAction.init()

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

All CarPlay types →