One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

Subview

struct · iOS 18.0+ · SDK 27.1

nonisolated struct Subview

An opaque value representing a subview of another view. Access to a `Subview` can be obtained by using `ForEach(subviews:)` or `Group(subviews:)`. Subviews are proxies to the resolved view they represent, meaning that modifiers applied to the original view will be applied before modifiers applied to the subview, and the view is resolved using the environment of its container, *not* the environment of the its subview proxy. Additionally, because subviews must represent a single leaf view, or container, a subview may represent a view after the application of styles. As such, attempting to apply a style to it may have no affect.

Members (2)

get · iOS 18.0+

containerValues

TypeScript
get containerValues(): ContainerValues
Swift declaration
nonisolated var containerValues: ContainerValues { get }

The container values associated with the given subview.

get · iOS 18.0+

id

TypeScript
get id(): Subview_ID
Swift declaration
nonisolated var id: Subview.ID { get }

The unique identifier of the view. This identifier persists across updates, changes to the order of subviews, etc. so can be used to track the lifetime of a subview.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUICore types →