Returns an CAConstraint object with the specified parameters. Designated initializer.
Original signature is '- (id)initWithAttribute:(CAConstraintAttribute)attr relativeTo:(NSString *)srcLayer attribute:(CAConstraintAttribute)srcAttr scale:(CGFloat)scale offset:(CGFloat)offset'
Available in Mac OS X v10.5 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public CAConstraint( CAConstraintAttribute attr, NSString srcLayer, CAConstraintAttribute srcAttr, CGFloat scale, CGFloat offset )
Public Sub New ( _ attr As CAConstraintAttribute, _ srcLayer As NSString, _ srcAttr As CAConstraintAttribute, _ scale As CGFloat, _ offset As CGFloat _ )
public: CAConstraint( CAConstraintAttribute attr, NSString^ srcLayer, CAConstraintAttribute srcAttr, CGFloat scale, 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.
- scale (CGFloat)
- The amount to scale the value of srcAttr.
- offset (CGFloat)
- The offset added to the value of srcAttr.
Return Value
An initialized constraint object using the specified parameters.
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)