Starting from iOS 16, SwiftUI provides AnyLayout
and the Layout
protocol for developers to create customized and complex layouts. AnyLayout
is a type-erased instance of the layout protocol. You can use AnyLayout
to create a dynamic layout that responds to users’ interactions or environment changes.