startIndex
TypeScriptget startIndex(): numberSwift declarationvar startIndex: Int { get }The index of the first subview.
struct · iOS 16.0+ · SDK 27.1
struct LayoutSubviewsA collection of proxy values that represent the subviews of a layout view. You receive a `LayoutSubviews` input to your implementations of ``Layout`` protocol methods, like ``Layout/placeSubviews(in:proposal:subviews:cache:)`` and ``Layout/sizeThatFits(proposal:subviews:cache:)``. The `subviews` parameter (which the protocol aliases to the ``Layout/Subviews`` type) is a collection that contains proxies for the layout's subviews (of type ``LayoutSubview``). The proxies appear in the collection in the same order that they appear in the ``ContentBuilder`` input to the layout container. Use the proxies to perform layout operations. Access the proxies in the collection as you would the contents of any Swift random-access collection. For example, you can enumerate all of the subviews and their indices to inspect or operate on them: for (index, subview) in subviews.enumerated() { // ... }
get startIndex(): numberSwift declarationvar startIndex: Int { get }The index of the first subview.
get layoutDirection(): LayoutDirectionSwift declarationvar layoutDirection: LayoutDirectionThe layout direction inherited by the container view. SwiftUI supports both left-to-right and right-to-left directions. Read this property within a custom layout container to find out which environment the container is in. In most cases, you don't need to take any action based on this value. SwiftUI horizontally flips the x position of each view within its parent when the mode switches, so layout calculations automatically produce the desired effect for both directions.
set layoutDirection(value: LayoutDirection)Swift declarationvar layoutDirection: LayoutDirectionThe layout direction inherited by the container view. SwiftUI supports both left-to-right and right-to-left directions. Read this property within a custom layout container to find out which environment the container is in. In most cases, you don't need to take any action based on this value. SwiftUI horizontally flips the x position of each view within its parent when the mode switches, so layout calculations automatically produce the desired effect for both directions.
get endIndex(): numberSwift declarationvar endIndex: Int { get }An index that's one higher than the last subview.
subscript(index: number): LayoutSubviewSwift declarationsubscript(index: Int) -> LayoutSubviews.Element { get }Gets the subview proxy at a specified index.
subscript64883(bounds: SDKHandle): LayoutSubviewsSwift declarationsubscript(bounds: Range<Int>) -> LayoutSubviews { get }Gets the subview proxies in the specified range.
subscript55965(indices: Array<number>): LayoutSubviewsSwift declarationsubscript<S>(indices: S) -> LayoutSubviews where S : Sequence, S.Element == Int { get }Gets the subview proxies with the specified indicies.
No declarations were skipped in this snapshot.