AnyLayout

A type-erased instance of the layout protocol.

ComponentiOS 16.0+macOS 13.0+tvOS 16.0+watchOS 9.0+AnyLayout in SwiftUI

Declaration

React
import { AnyLayout } from 'swiftui-react-native';
Swift
@frozen struct AnyLayout

Initializers

One SwiftUI initializer backs <AnyLayout>.

React
<AnyLayout
  layout: SwiftUI.Layout
>
  children?: ReactNode
</AnyLayout>
Swift
init<L>(_ layout: L) where L : Layout

Also takes the common view props: modifiers, style and testID.

See also

More in Layout.