init(id:title:perform:)
Creates a tip action that generates its label from a string.
Declaration
@preconcurrency nonisolated init(id: String? = nil, title: some StringProtocol, perform handler: @escaping @MainActor @Sendable () -> Void = {})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. - title:
A string that describes the purpose of the tip action.
- handler:
The function the system calls when the action triggers.