YMASizeConstraint
Objective-C
@interface YMASizeConstraint : NSObject <NSCopying, NSMutableCopying>
Swift
class YMASizeConstraint : NSObject, NSCopying, NSMutableCopying
A class with object sizing constraints. If you want to edit the object sizing constraints, use the YMAMutableSizeConstraint
class.
Object sizing constraint. See acceptable values in YMASizeConstraintType
.
Declaration
Objective-C
@property (nonatomic, readonly) YMASizeConstraintType type;
Swift
var type: YMASizeConstraintType { get }
The constraint value. The meaning of the value depends on the type
property.
Declaration
Objective-C
@property (nonatomic, readonly) CGFloat value;
Swift
var value: CGFloat { get }
Creates an object of the YMASizeConstraint
class (object sizing constraint).
Declaration
Objective-C
+ (nonnull instancetype)constraintWithType:(YMASizeConstraintType)type
value:(CGFloat)value;
Swift
convenience init(type: YMASizeConstraintType, value: CGFloat)
Parameters
type | Object sizing constraint. See acceptable values in |
value | The constraint value. The meaning of the value depends on the |
type | Object sizing constraint. See acceptable values in |
value | The constraint value. The meaning of the value depends on the |
Return Value
The specified object sizing constraint.