<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollisionBehavior/setTranslatesReferenceBoundsIntoBoundary(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollisionBehavior(im)setTranslatesReferenceBoundsIntoBoundaryWithInsets:"
  },
  "title" : "setTranslatesReferenceBoundsIntoBoundary(with:)"
}
-->

# setTranslatesReferenceBoundsIntoBoundary(with:)

Specifies a collision boundary based on the bounds of the animation reference system, with optional insets.

```
func setTranslatesReferenceBoundsIntoBoundary(with insets: UIEdgeInsets)
```

## Parameters

`insets`

Insets to apply to the reference system’s bounds when defining the collision boundary.

## Discussion

The result of using this method depends on how you’ve initialized the dynamic animator (of class [`UIDynamicAnimator`](/documentation/UIKit/UIDynamicAnimator)) that you’ve added the collision behavior to. See the overview in [`UIDynamicAnimator`](/documentation/UIKit/UIDynamicAnimator) for a discussion of initialization options and modes for animators.

Here is how the dynamic animator’s initialization impacts use of this method:

- For a view-only dynamic animator, the reference bounds are those of the reference view
- For a collection-view dynamic animator, the reference bounds are those of the collection view layout
- For a dynamic-item dynamic animator, there are no reference bounds.

For a collision behavior added to a view-only or collection-view dynamic animator, activate a reference-system-based collision boundary by setting the [`translatesReferenceBoundsIntoBoundary`](/documentation/UIKit/UICollisionBehavior/translatesReferenceBoundsIntoBoundary) property to <doc://com.apple.documentation/documentation/Swift/true>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)