Axis

public enum Axis : Hashable, CustomStringConvertible

Represents a size constraint for a single axis.

  • The measurement should treat the associated value as the largest possible size in the given dimension.

    Declaration

    Swift

    case atMost(CGFloat)
  • The measurement is unconstrained in the given dimension.

    Declaration

    Swift

    case unconstrained
  • The maximum magnitude in the given dimension.

    Declaration

    Swift

    public var maximum: CGFloat { get }
  • The minimum magnitude in the given dimension.

    Declaration

    Swift

    public var minimum: CGFloat { get }
  • The constraint value in this dimension, or nil if this dimension is unconstrained.

    Declaration

    Swift

    public var constrainedValue: CGFloat? { get }
  • Adds a scalar value to an Axis. If the Axis is unconstrained the result will remain unconstrained.

    Declaration

    Swift

    public static func + (lhs: SizeConstraint.Axis, rhs: CGFloat) -> SizeConstraint.Axis
  • Subtracts a scalar value from an Axis. If the Axis is unconstrained the result will remain unconstrained.

    Declaration

    Swift

    public static func - (lhs: SizeConstraint.Axis, rhs: CGFloat) -> SizeConstraint.Axis
  • Divides an Axis by a scalar value. If the Axis is unconstrained the result will remain unconstrained.

    Declaration

    Swift

    public static func / (lhs: SizeConstraint.Axis, rhs: CGFloat) -> SizeConstraint.Axis
  • Multiplies an Axis by a scalar value. If the Axis is unconstrained the result will remain unconstrained.

    Declaration

    Swift

    public static func * (lhs: SizeConstraint.Axis, rhs: CGFloat) -> SizeConstraint.Axis
  • If the Axis is greater than zero.

    Declaration

    Swift

    public var isGreaterThanZero: Bool { get }
  • Adds a scalar value to an Axis. If the Axis is unconstrained the result will remain unconstrained.

    Declaration

    Swift

    public static func += (lhs: inout SizeConstraint.Axis, rhs: CGFloat)
  • Subtracts a scalar value from an Axis. If the Axis is unconstrained the result will remain unconstrained.

    Declaration

    Swift

    public static func -= (lhs: inout SizeConstraint.Axis, rhs: CGFloat)
  • Divides an Axis by a scalar value. If the Axis is unconstrained the result will remain unconstrained.

    Declaration

    Swift

    public static func /= (lhs: inout SizeConstraint.Axis, rhs: CGFloat)
  • Multiplies an Axis by a scalar value. If the Axis is unconstrained the result will remain unconstrained.

    Declaration

    Swift

    public static func *= (lhs: inout SizeConstraint.Axis, rhs: CGFloat)

CustomDebugStringConvertible

  • Declaration

    Swift

    public var description: String { get }