Contents

webViewOnScrollGeometryChange(for:of:action:)

Adds an action to be performed when a value, created from a scroll geometry, changes.

Declaration

nonisolated func webViewOnScrollGeometryChange<T>(for type: T.Type, of transform: @escaping (ScrollGeometry) -> T, action: @escaping (T, T) -> Void) -> some View where T : Hashable

Parameters

  • type:

    The type of value transformed from a Scrollgeometry.

  • transform:

    A closure that transforms a Scrollgeometry to your type.

  • action:

    A closure to run when the transformed data changes.

Return Value

A view that invokes the action when the relevant part of a web view’s scroll geometry changes.

Discussion

See Also

Displaying web content