init
TypeScriptstatic initImageAlignment(image: _UIKit_UIImage, alignment: CPImageOverlay_Alignment): Promise<CPImageOverlay>Swift declarationinit(image: UIImage, alignment: CPImageOverlay.Alignment)class · iOS 26.4+ · SDK 27.1
@MainActor class CPImageOverlaystatic initImageAlignment(image: _UIKit_UIImage, alignment: CPImageOverlay_Alignment): Promise<CPImageOverlay>Swift declarationinit(image: UIImage, alignment: CPImageOverlay.Alignment)static initTextTextColorBackgroundColorAlignment(text: string, textColor: _UIKit_UIColor, backgroundColor: _UIKit_UIColor, alignment: CPImageOverlay_Alignment): Promise<CPImageOverlay>Swift declarationinit(text: String, textColor: UIColor, backgroundColor: UIColor, alignment: CPImageOverlay.Alignment)get alignment(): Promise<CPImageOverlay_Alignment>Swift declarationvar alignment: CPImageOverlay.Alignment { get }get backgroundColor(): Promise<(_UIKit_UIColor) | null>Swift declarationvar backgroundColor: UIColor? { get }get image(): Promise<(_UIKit_UIImage) | null>Swift declarationvar image: UIImage? { get }get text(): Promise<(string) | null>Swift declarationvar text: String? { get }get textColor(): Promise<(_UIKit_UIColor) | null>Swift declarationvar textColor: UIColor? { get }1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
CPImageOverlay.init()
inherited init: cannot prove legal (class declares 2 custom initializers)