One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

ZStackLayout

struct · iOS 16.0+ · SDK 27.1

@frozen struct ZStackLayout

An overlaying container that you can use in conditional layouts. This layout container behaves like a ``ZStack``, but conforms to the ``Layout`` protocol so you can use it in the conditional layouts that you construct with ``AnyLayout``. If you don't need a conditional layout, use ``ZStack`` instead.

Members (3)

get · iOS 16.0+

alignment

TypeScript
get alignment(): Alignment
Swift declaration
var alignment: Alignment

The alignment of subviews.

set · iOS 16.0+

alignment

TypeScript
set alignment(value: Alignment)
Swift declaration
var alignment: Alignment

The alignment of subviews.

init · iOS 16.0+

init

TypeScript
static init(alignment?: Alignment): ZStackLayout
Swift declaration
init(alignment: Alignment = .center)

Creates a stack with the specified alignment. - Parameters: - alignment: The guide for aligning the subviews in this stack on both the x- and y-axes.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUICore types →