Expand description

This module contains traits and helpers for layout. By default, standard frame-based layouts are supported via the Layout trait, which all widgets implement. If you opt in to the AutoLayout feature, each widget will default to using AutoLayout, which can be beneficial in more complicated views that need to deal with differing screen sizes.

Structs

A wrapper for NSLayoutConstraint. This both acts as a central path through which to activate constraints, as well as a wrapper for layout constraints that are not axis bound (e.g, width or height).

A wrapper for an animation proxy object in Cocoa that supports basic animations.

A SafeAreaLayoutGuide should exist on all view types, and ensures that there are anchor points that work within the system constraints. On macOS 11+, this will ensure you work around system padding transprently - on macOS 10.15 and under, this will transparently map to the normal edges, as the underlying properties were not supported there.

Enums

A wrapper for NSLayoutAnchorDimension, which is typically used to handle width and height values for how a given view should layout.

A wrapper for NSLayoutAnchorX, used to handle values for how a given view should layout along the x-axis.

A wrapper for NSLayoutAnchorY, used to handle values for how a given view should layout along the y-axis.

Represents attributes for various layouts and constraints.

Represents whether a layout is vertical or horizontal.

Represents a layout format.

Specifies layout priority.

Represents a relation between layout constraints. Used mostly internally.

Traits

A trait that view wrappers must conform to. Enables managing the subview tree.