Aller au contenu

extension View

Ce contenu n’est pas encore disponible dans votre langue.

extension View

Adds the members below to SwiftUICore.View.

Defined in: Sources/FrakSDKUI/FrakSharingSheet.swift:5

frakSharingSheet(isPresented:request:configuration:onResult:)

Section titled “frakSharingSheet(isPresented:request:configuration:onResult:)”
@MainActor func frakSharingSheet(
isPresented: Binding<Bool>,
request: SharingRequest,
configuration: FrakSharingConfiguration = FrakSharingConfiguration(),
onResult: @escaping (SharingResult) -> Void = { _ in }
) -> some View

Presents the Frak sharing sheet while isPresented is true. Hoist onto a screen-level view, not a list row: attaching this modifier always warms a pooled WKWebView, so one per row is one engine per row.

  • Parameters:
    • isPresented: whether the sheet is up.
    • request: what to share.
    • configuration: sheet height and which store surface the install step raises.
    • onResult: called once per presentation with the most significant outcome.
  • Returns: content wrapped with the sheet’s presentation, warm-up and teardown.