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 theMutableSizeConstraint class.
-
Object sizing constraint.
Remark
Acceptable values are listed inSizeConstraintTypeenum.Declaration
Swift
public var type: SizeConstraintType { get } -
The constraint value. The meaning of the value depends on the
typeproperty.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
SizeConstraintclass, i.e., the object sizing constraint.Declaration
Swift
public required convenience init(type: SizeConstraintType, value: CGFloat)Parameters
typeObject sizing constraint. Acceptable values are listed in
SizeConstraintType.valueThe constraint value. The meaning of the value depends on the
typeproperty.Return Value
The specified object sizing constraint.
-
Creates an object of the
SizeConstraintclass, i.e., the object sizing constraint.Declaration
Swift
public static func constraintWithType(_ type: SizeConstraintType, value: CGFloat) -> SelfParameters
typeObject sizing constraint. Acceptable values are listed in
SizeConstraintType.valueThe constraint value. The meaning of the value depends on the
typeproperty.Return Value
The specified object sizing constraint.
-
Undocumented
Declaration
Swift
public func copy(with zone: NSZone? = nil) -> Any
-
Undocumented
Declaration
Swift
public func mutableCopy(with zone: NSZone? = nil) -> Any