One Logo Pool Ball
_AppIntents_UIKit · IOS API REFERENCE

ShortcutsUIButton

class · iOS 16.0+ · SDK 27.1

@MainActor @objc @preconcurrency final class ShortcutsUIButton

A button that opens the current app's page in the Shortcuts app. You can add additional targets to observe when the button is tapped.

Members (4)

method · iOS 16.0+

sizeThatFits

TypeScript
sizeThatFits(size: { width: number; height: number }): Promise<{ width: number; height: number }>
Swift declaration
@MainActor @preconcurrency override final func sizeThatFits(_ size: CGSize) -> CGSize
get · iOS 16.0+

style

TypeScript
get style(): Promise<__AppIntents_SwiftUI_ShortcutsLinkStyle>
Swift declaration
@MainActor @preconcurrency final var style: ShortcutsLinkStyle { get set }

The style to use for the button.

set · iOS 16.0+

style

TypeScript
setStyle(value: __AppIntents_SwiftUI_ShortcutsLinkStyle): Promise<void>
Swift declaration
@MainActor @preconcurrency final var style: ShortcutsLinkStyle { get set }

The style to use for the button.

init · iOS 16.0+

init

TypeScript
static init(style?: __AppIntents_SwiftUI_ShortcutsLinkStyle): Promise<ShortcutsUIButton>
Swift declaration
@MainActor @preconcurrency init(style: ShortcutsLinkStyle = .automatic)

Creates a button with the specified style. - Parameter style: The style to use, defaults to ``ShortcutsLinkStyle/automatic``.

Skipped declarations

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

ShortcutsUIButton.addTarget(_:action:for:)

Objective-C selectors cannot cross the bridge.

All _AppIntents_UIKit types →