Creates and returns an CAConstraint object with the specified parameters.
Original signature is '+ (id)constraintWithAttribute:(CAConstraintAttribute)attr relativeTo:(NSString *)srcLayer attribute:(CAConstraintAttribute)srcAttr'
Available in Mac OS X v10.5 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static CAConstraint ConstraintWithAttributeRelativeToAttribute( CAConstraintAttribute attr, NSString srcLayer, CAConstraintAttribute srcAttr )
Public Shared Function ConstraintWithAttributeRelativeToAttribute ( _ attr As CAConstraintAttribute, _ srcLayer As NSString, _ srcAttr As CAConstraintAttribute _ ) As CAConstraint
public: static CAConstraint^ ConstraintWithAttributeRelativeToAttribute( CAConstraintAttribute attr, NSString^ srcLayer, CAConstraintAttribute srcAttr )
Parameters
- attr (CAConstraintAttribute)
- The attribute of the layer for which to create a new constraint.
- srcLayer (NSString)
- The name of the layer that this constraint is calculated relative to.
- srcAttr (CAConstraintAttribute)
- The attribute of srcLayer the constraint is calculated relative to.
Return Value
A new CAConstraint object with the specified parameters. The scale of the constraint is set to 1.0. The offset of the constraint is set to 0.0.
Version Information
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)