init(id:perform:_:)
Creates a tip action that displays a custom label.
Declaration
@preconcurrency init(id: String? = nil, perform handler: @escaping @MainActor @Sendable () -> Void = {}, _ label: @escaping @Sendable () -> Text)Parameters
- id:
An optional identifier associated with the action. If you don’t specify a value, the system assigns the action’s
indexto this value. - handler:
The function the system calls when the action triggers.
- label:
A view that describes the purpose of the tip action.