init(attribute:relativeTo:attribute:)
Creates and returns an CAConstraint object with the specified parameters.
Declaration
convenience init(attribute attr: CAConstraintAttribute, relativeTo srcId: String, attribute srcAttr: CAConstraintAttribute)Parameters
- attr:
The attribute of the layer for which to create a new constraint.
- srcId:
The name of the layer that this constraint is calculated relative to.
- srcAttr:
The attribute of
srcLayerthe 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.
Discussion
The value for the constraint is calculated is srcAttr.