One Logo Pool Ball
TipKit · IOS API REFERENCE

Tips.Action

struct · iOS 17.0+ · SDK 27.1

struct Action

A type that describes a control associated with a tip.

Members (5)

init · iOS 17.0+

init

TypeScript
static init(id: (string) | null, title: SDKHandle, handler?: (() => void)): Promise<Tips_Action>
Swift declaration
@preconcurrency nonisolated init(id: String? = nil, title: some StringProtocol, perform handler: @escaping @MainActor @Sendable () -> Void = {})

Creates a tip action that generates its label from a string. - Parameters: - id: An optional identifier associated with the action. If you don't specify a value, the system assigns the action's `index` to this value. - title: A string that describes the purpose of the tip action. - handler: The function the system calls when the action triggers.

get · iOS 17.0+

id

TypeScript
get id(): string
Swift declaration
let id: String

The identifier for a tip's action. If you don't specify a value in the initializer, the system assigns one based on the value of the `index`.

get · iOS 17.0+

index

TypeScript
get index(): (number) | null
Swift declaration
let index: Int?
get · iOS 17.0+

label

TypeScript
get label(): (() => Promise<_SwiftUICore_Text>)
Swift declaration
let label: @Sendable () -> Text
get · iOS 17.0+

handler

TypeScript
get handler(): Promise<(() => Promise<void>)>
Swift declaration
@preconcurrency let handler: @MainActor @Sendable () -> Void

Skipped declarations

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

Tips.Action.init(id:perform:_:)

callback cannot propagate synchronous failure

All TipKit types →