SizeConstraint

@objc(YMASizeConstraint)
@objcMembers
public class SizeConstraint : NSObject, NSCopying, NSMutableCopying

A class with object sizing constraints.

Remark

If you want to edit the object sizing constraints, use the MutableSizeConstraint class.
  • Object sizing constraint.

    Remark

    Acceptable values are listed in SizeConstraintType enum.

    Declaration

    Swift

    public var type: SizeConstraintType { get }
  • The constraint value. The meaning of the value depends on the type property.

    Declaration

    Swift

    public var value: CGFloat { get }
  • Corresponding mutable representation of current size constraint.

    Declaration

    Swift

    public var mutableConstraint: MutableSizeConstraint { get }
  • Undocumented

    Declaration

    Swift

    override public convenience init()
  • Creates an object of the SizeConstraint class, i.e., the object sizing constraint.

    Declaration

    Swift

    public required convenience init(type: SizeConstraintType, value: CGFloat)

    Parameters

    type

    Object sizing constraint. Acceptable values are listed in SizeConstraintType.

    value

    The constraint value. The meaning of the value depends on the type property.

    Return Value

    The specified object sizing constraint.

  • Creates an object of the SizeConstraint class, i.e., the object sizing constraint.

    Declaration

    Swift

    public static func constraintWithType(_ type: SizeConstraintType, value: CGFloat) -> Self

    Parameters

    type

    Object sizing constraint. Acceptable values are listed in SizeConstraintType.

    value

    The constraint value. The meaning of the value depends on the type property.

    Return Value

    The specified object sizing constraint.

NSCopying

  • Undocumented

    Declaration

    Swift

    public func copy(with zone: NSZone? = nil) -> Any

NSMutableCopying

  • Undocumented

    Declaration

    Swift

    public func mutableCopy(with zone: NSZone? = nil) -> Any