---
title: "setTranslatesReferenceBoundsIntoBoundary(with:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollisionbehavior/settranslatesreferenceboundsintoboundary(with:)"
---

# setTranslatesReferenceBoundsIntoBoundary(with:)

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

## Declaration

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

## Parameters

- `insets`: Insets to apply to the reference system’s bounds when defining the collision boundary.

## Discussion

Discussion The result of using this method depends on how you’ve initialized the dynamic animator (of class UIDynamicAnimator) that you’ve added the collision behavior to. See the overview in 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 property to true.

## See Also

### Configuring a collision behavior

- [addBoundary(withIdentifier:for:)](uikit/uicollisionbehavior/addboundary(withidentifier:for:).md)
- [addBoundary(withIdentifier:from:to:)](uikit/uicollisionbehavior/addboundary(withidentifier:from:to:).md)
- [boundaryIdentifiers](uikit/uicollisionbehavior/boundaryidentifiers.md)
- [boundary(withIdentifier:)](uikit/uicollisionbehavior/boundary(withidentifier:).md)
- [collisionMode](uikit/uicollisionbehavior/collisionmode.md)
- [removeAllBoundaries()](uikit/uicollisionbehavior/removeallboundaries().md)
- [removeBoundary(withIdentifier:)](uikit/uicollisionbehavior/removeboundary(withidentifier:).md)
- [translatesReferenceBoundsIntoBoundary](uikit/uicollisionbehavior/translatesreferenceboundsintoboundary.md)
