Creates and returns an attachment behavior where the two items are fixed together through the specified anchor point.
- iOS 9.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The first of two dynamic items connected by the attachment behavior.
The second of two dynamic items connected by the attachment behavior.
The anchor point for both items. Specify this point in the coordinate system of the dynamic animator’s reference view. For more information about coordinate systems, see
A new attachment object or
nil if the object could not be created.
The behavior created by this method acts like a solid rod connecting each item to the specified anchor point. The position of the items relative to each other does not change. Forces acting on the items move them together as if they were a single unit.