---
title: UICollisionBehaviorDelegate
framework: uikit
role: symbol
role_heading: Protocol
path: uikit/uicollisionbehaviordelegate
---

# UICollisionBehaviorDelegate

To respond to UIKit dynamic item collisions, configure a custom class to adopt the UICollisionBehaviorDelegate protocol. Then, in a collision behavior (an instance of the UICollisionBehavior class), set the delegate to be an instance of your custom class.

## Declaration

```swift
@MainActor protocol UICollisionBehaviorDelegate : NSObjectProtocol
```

## Overview

Overview The delegate is notified of collisions that occur between the behavior’s dynamic items, or between a dynamic item and a boundary, depending on the behavior’s mode (as set with its collisionMode property). In the case of a collision between an item and the boundary defined by a reference view, the identifier passed to the delegate method is nil. (For more on the reference view and the different ways to initialize a dynamic animator, read the Overview in UIDynamicAnimator.)

## Topics

### Responding to UIKit Dynamics collisions

- [collisionBehavior(_:beganContactFor:withBoundaryIdentifier:at:)](uikit/uicollisionbehaviordelegate/collisionbehavior(_:begancontactfor:withboundaryidentifier:at:).md)
- [collisionBehavior(_:beganContactFor:with:at:)](uikit/uicollisionbehaviordelegate/collisionbehavior(_:begancontactfor:with:at:).md)
- [collisionBehavior(_:endedContactFor:withBoundaryIdentifier:)](uikit/uicollisionbehaviordelegate/collisionbehavior(_:endedcontactfor:withboundaryidentifier:).md)
- [collisionBehavior(_:endedContactFor:with:)](uikit/uicollisionbehaviordelegate/collisionbehavior(_:endedcontactfor:with:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Customizing the collision behavior

- [collisionDelegate](uikit/uicollisionbehavior/collisiondelegate.md)
