Skip to main content

register

Function register 

Source
pub fn register<L: LayoutAlgorithm>(algorithm: L) -> CustomLayout
Expand description

Register any LayoutAlgorithm, returning the handle SwiftUI stores.

The algorithm is leaked: SwiftUI keeps the Layout value for as long as the view exists, and the index inside it has to stay valid that long.