Creates and returns an CAConstraint object with the specified parameters.
Original signature is '+ (id)constraintWithAttribute:(CAConstraintAttribute)attr relativeTo:(NSString *)srcLayer attribute:(CAConstraintAttribute)srcAttr offset:(CGFloat)offset'
Available in Mac OS X v10.5 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static CAConstraint ConstraintWithAttributeRelativeToAttributeOffset( CAConstraintAttribute attr, NSString srcLayer, CAConstraintAttribute srcAttr, CGFloat offset )
Public Shared Function ConstraintWithAttributeRelativeToAttributeOffset ( _ attr As CAConstraintAttribute, _ srcLayer As NSString, _ srcAttr As CAConstraintAttribute, _ offset As CGFloat _ ) As CAConstraint
public: static CAConstraint^ ConstraintWithAttributeRelativeToAttributeOffset( CAConstraintAttribute attr, NSString^ srcLayer, CAConstraintAttribute srcAttr, CGFloat offset )
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.
- offset (CGFloat)
- The offset added to the value of srcAttr.
Return Value
A new CAConstraint object with the specified parameters. The scale of the constraint is set to 1.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)