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.

  1. Properties
  2. type
  3. value
  4. Methods
  5. +constraintWithType:value:

Properties

type

Object sizing constraint. See acceptable values in YMASizeConstraintType.

Declaration

Objective-C

@property (nonatomic, readonly) YMASizeConstraintType type;

Swift

var type: YMASizeConstraintType { get }

value

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 }

Methods

+constraintWithType:value:

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 YMASizeConstraintType.

value

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

type

Object sizing constraint. See acceptable values in YMASizeConstraintType.

value

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

Return Value

The specified object sizing constraint.