Constraint

public enum Constraint : Equatable

The available ways to constrain the measurement of a given axis within a ConstrainedSize element.

  • There is no constraint for this axis – the natural size of the element will be used.

    Declaration

    Swift

    case unconstrained
  • The measured size for this axis will be no greater than the value provided.

    Declaration

    Swift

    case atMost(CGFloat)
  • The measured size for this axis will be no less than the value provided.

    Declaration

    Swift

    case atLeast(CGFloat)
  • The measured size for this axis will be within the range provided. If the measured value is below the bottom of the range, the lower value will be used. If the measured value is above the top of the range, the lower value will be used.

    Declaration

    Swift

    case within(ClosedRange<CGFloat>)
  • The measured size for this axis will be exactly the value provided.

    Declaration

    Swift

    case absolute(CGFloat)